metadata in remote transmission #3787
Unanswered
Marcioghiraldelli
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I created this liquidsoap script for Azuracast, I believe it doesn't change anything in a direct configuration to LS.
However, I've done everything but I can't retrieve the metadata from the remote transmission and apply it to the radio information.
I even made a part that if it doesn't find metadata or if it takes a while to return, it shows a default message, but none of it works.
there is information about the last song played, and the remote transmission in progress.
Can anyone help me with this?
playlist_teste43 = mksafe(buffer(buffer=2., input.http("https://centova.svdns.com.br:20067/stream?1696383604890")))
Função para inserir um valor padrão se os metadados estiverem vazios
def insert_missing(m)
if m == [] or m["title"] == "" then
[("title", "Transmissão Remota")]
else
m
end
end
---------------------script
Fonte de áudio remota com metadados padrão aplicados
playlist_teste43_with_default = map_metadata(insert_missing, playlist_teste43)
Playlist de vinhetas de hora certa
playlist_hora_certa = playlist(id="playlist_hora_certa", mime_type="audio/x-mpegurl", mode="randomize", reload_mode="watch", "/var/azuracast/stations/queima2/playlists/playlist_hora_certa.m3u")
Função de transição com fade
def transition(a, b)
add(normalize=false, [
fade.out(duration=3., a),
fade.in(duration=3., b)
])
end
Definindo os horários para a playlist de hora certa e a fonte remota
radio = switch(track_sensitive=false, transitions=[transition, transition], [
({ 20h49m-21h00m }, sequence([playlist_hora_certa, playlist_teste43_with_default])), # Toca a playlist de hora certa e depois a fonte remota
({ 21h00m }, sequence([playlist_hora_certa, radio])), # Após a transmissão remota, toca novamente a playlist de hora certa e depois volta para a programação normal
({true}, radio) # Fora desses horários, toca a programação normal
])
Fallback para uma fonte segura em caso de erro
safe_radio = fallback(track_sensitive=false, [radio, single("/usr/local/share/icecast/web/error.mp3")])
Beta Was this translation helpful? Give feedback.
All reactions