stream: add a skip-to-next button and /skip route
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
04ea54c03e
commit
a468d78153
2 changed files with 33 additions and 0 deletions
|
|
@ -111,3 +111,14 @@ harbor.http.register(
|
|||
resp.json({title=m["title"], artist=m["artist"]})
|
||||
end
|
||||
)
|
||||
|
||||
# Passer au morceau suivant : on saute le morceau en cours sur la source
|
||||
# diffusée. request.dynamic a déjà préchargé le suivant, donc l'enchaînement
|
||||
# est immédiat (le prochain /next est demandé au daemon dans la foulée).
|
||||
harbor.http.register(
|
||||
port=8000, method="POST", "/skip",
|
||||
fun(_, resp) -> begin
|
||||
source.skip(radio)
|
||||
resp.json({skipped=true})
|
||||
end
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue