Unable to skip tracks after using queue.push.uri("#{fname}") or interrupting_queue.push.uri("#{fname}") #4247
Replies: 3 comments 10 replies
-
Hi! Logic is very simple. Where you put your code along the chain of functions — it will be applied to the source right there. If you put |
Beta Was this translation helpful? Give feedback.
-
Thanks @gAlleb. Can I get the queue number through |
Beta Was this translation helpful? Give feedback.
-
Hi @gAlleb, as mentioned in the Liquidsoap book, I have added an endpoint to retrieve the current track metadata. However, the issue is that it returns a large set of album cover image data, which slows down the API request. I would like to exclude the cover from the JSON response. Is it possible to specify only the metadata tags we need? # Endpoint to get current track information
last_metadata = ref([])
radio.on_track(fun (m) -> last_metadata := m)
def show_metadata(_) =
http.response(
content_type="application/json; charset=UTF-8",
data=metadata.json.stringify(last_metadata())
)
end
harbor.http.register.simple(port=8007, "/metadata", show_metadata) {
"cover": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAKAC.....................nnnnnnnn",
"album": "Witty",
"date": "2023",
"year": "2023",
"artist": "Witty",
"title": "Title",
"genre": "filmi",
"tracknumber": "1/2"
} Thanks. |
Beta Was this translation helpful? Give feedback.
-
Dear @gAlleb,
When I use the /play or /play_now endpoints to play a track by pushing it to the queue or interrupting queue, I am unable to skip the track using the /skip endpoint. Additionally, I don't see any logs in the terminal when trying to skip.
Audio Code
How can I make the skip function work when 'play' or 'play_now' is used?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions