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
I am trying to workaround the issue mentioned here: #4316.
I have some progress, but still cant get it work.
The problem occurs in the following scenario:
Liquidsoap plays some playlist.pls with tracks a, b, and c
Let's say playlist.pls is reloaded while playing track b
New version of playlist.pls contains tracks d, e, f and g
After finishing the playback of b track Liquidsoap does request queuing in reverse order.
Request queue looks like this: f, e, d (provided we have prefetch_request set to 3)
As the result the playback also starts in the reverse order.
This happens only while the very first queuing - after it the order is correct.
So I am trying to workaround it by the following on_reload callback, simplified code can be found below:
myplaylist=playlist("/playlist.pls",reload_mode="watch",mode="normal", on_reload=chk_source_order)
...
defchk_source_order() =# currently queue looks as follows: `f`, `e`, `d`# reverse the queue and resolve outstanding requests in reversed orderq=list.map.right(fun (req) ->beginprint("request status: #{request.status(req)}, request metadata: #{request.metadata(req)}")
ignore(request.destroy(req))
request.create(request.uri(req))
end, myplaylist.queue())
# New requests order is correct now: `d`, `e`, `f`# My assumption was that if I recreate requests and put them in reversed order back to the playlist's queue# they will be played in a good order,# but in fact they are simply skipped and playback proceeds with the following song (`g`)myplaylist.set_queue(q)
end
My question is how to enforce correct playback order of the first queue requests after playlist reload?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey community!
I am trying to workaround the issue mentioned here: #4316.
I have some progress, but still cant get it work.
The problem occurs in the following scenario:
playlist.pls
with tracksa
,b
, andc
playlist.pls
is reloaded while playing trackb
playlist.pls
contains tracksd
,e
,f
andg
f
,e
,d
(provided we haveprefetch_request
set to 3)So I am trying to workaround it by the following
on_reload
callback, simplified code can be found below:My question is how to enforce correct playback order of the first queue requests after playlist reload?
Beta Was this translation helpful? Give feedback.
All reactions