Commit 5689741c authored by david's avatar david
Browse files

Apocalyptic fallback handling in case no station fallback is available or some...

Apocalyptic fallback handling in case no station fallback is available or some blocking issues occur, such as LiquidSoap <-> Engine connection failure.
parent 56e05f63
Pipeline #556 passed with stage
in 1 minute and 49 seconds
......@@ -120,7 +120,7 @@ def fallback_create(~skip=true, name, requestor)
system('#{list.assoc("install_dir", ini)}/guru.py --adapt-trackservice name'),
source)
log("channel created")
log("Channel created")
# Finally apply a smart crossfading
smart_crossfade(source)
......@@ -131,26 +131,35 @@ def create_dynamic_playlist(next)
end
def create_playlist() =
log("requesting next song for PLAYLIST")
log("Requesting next song for PLAYLIST")
result = get_process_lines('#{list.assoc("install_dir", ini)}/guru.py --get-next-file-for "playlist" --quiet')
create_dynamic_playlist(result)
end
def create_station_fallback() =
result = get_process_lines('#{list.assoc("install_dir", ini)}/guru.py --get-next-file-for station --quiet')
log("next song for STATION fallback is: #{result}")
create_dynamic_playlist(result)
log("Next song for STATION fallback is: #{result}")
if result == [] then
filename = '#{list.assoc("install_dir", ini)}/testing/content/ernie_mayne_sugar.mp3'
result = "ls #{filename}"
log("[CRITICAL] No STATION fallback available! Playing APOCALYPTIC FALLBACK: #{filename}")
result = get_process_lines("#{result}")
create_dynamic_playlist(result)
else
create_dynamic_playlist(result)
end
end
def create_show_fallback() =
result = get_process_lines('#{list.assoc("install_dir", ini)}/guru.py --get-next-file-for show --quiet')
log("next song for SHOW fallback is: #{result}")
log("Next song for SHOW fallback is: #{result}")
create_dynamic_playlist(result)
end
def create_timeslot_fallback() =
result = get_process_lines('#{list.assoc("install_dir", ini)}/guru.py --get-next-file-for timeslot --quiet')
log("next song for TIMESLOT fallback is: #{result}")
log("Next song for TIMESLOT fallback is: #{result}")
create_dynamic_playlist(result)
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment