You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by krangm January 23, 2023
Hello.
Please help to find out how to reuse source in rotate.merge after it's exit. As it states in docs, rotate.merge should loops a sequence of sources. But after source exit 0 on the end of track, stream goes safe_blank instead of looping sources.
Some info:
$ uname -a
Linux localhost 6.1.0-1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) x86_64 GNU/Linux
$ liquidsoap --version
Liquidsoap 2.1.3
LS code:
#!/usr/bin/liquidsoap
log.file.path.set("/home/user/radio/radio.log")
log.stdout.set(true)
def input.airsonic(~id="input.airsonic",
~restart=false,~restart_on_error=false,
~buffer=0.2,~max=20.,s) =
input.external.rawaudio(id=id,restart=restart,
restart_on_error=restart_on_error,
buffer=buffer,max=max,
"/home/user/radio/streamer #{string.quote(s)}")
end
trackids = (process.read.lines("cat /home/user/radio/total_songs.list"))
def input.airsonic.random(~id="input.airsonic.random",
~restart=false,~restart_on_error=false) =
input.airsonic(id=id,restart=restart,
restart_on_error=restart_on_error,
list.pick(list.shuffle(trackids)))
end
radio = rotate.merge([input.airsonic.random(),input.airsonic.random()])
radio = mksafe(radio)
output.icecast(%fdkaac(channels=2, samplerate=44100,
bandwidth="auto", bitrate=128, afterburner=true,
aot="mpeg4_he_aac_v2", transmux="adts", sbr_mode=true),
host = "x",
port = x,
password = "x",
mount = "x",
radio)
With current code, LS plays two random tracks and goes safe_blank after each of sources exit. If i try to set rotate.merge([input.airsonic.random(restart=true),input.airsonic.random(restart=true)])
only first source plays and it constantly repeats 1 track, so it does not perform list.pick() every time as expected.
Is there a way to reuse source without restart argument? Or to re-read variable on source repeat? Or maybe there is another approach?
The text was updated successfully, but these errors were encountered:
Discussed in #2860
Originally posted by krangm January 23, 2023
Hello.
Please help to find out how to reuse source in
rotate.merge
after it's exit. As it states in docs, rotate.merge should loops a sequence of sources. But after sourceexit 0
on the end of track, stream goessafe_blank
instead of looping sources.Some info:
LS code:
With current code, LS plays two random tracks and goes
safe_blank
after each of sources exit. If i try to setrotate.merge([input.airsonic.random(restart=true),input.airsonic.random(restart=true)])
only first source plays and it constantly repeats 1 track, so it does not perform
list.pick()
every time as expected.Is there a way to reuse source without restart argument? Or to re-read variable on source repeat? Or maybe there is another approach?
The text was updated successfully, but these errors were encountered: