CC-1665: Scheduled stream rebroadcasting and recording

-Step 1 to make Liquidsoap send back web stream metadata to UI
This commit is contained in:
Martin Konecny 2012-08-03 18:45:22 -04:00
parent f901e13a84
commit 1891a11373
2 changed files with 8 additions and 1 deletions

View file

@ -3,6 +3,11 @@ def notify(m)
system("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --data='#{!pypo_data}' --media-id=#{m['schedule_table_id']} &")
end
def notify_stream(m)
log("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --stream --uri=#{base64.encode(m['uri'])} --title=#{base64.encode(m['title'])} &")
#system("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --stream --uri=#{base64.encode(m['uri'])} --title=#{base64.encode(m['title'])} &")
end
# A function applied to each metadata chunk
def append_title(m) =
log("Using stream_format #{!stream_metadata_type}")

View file

@ -20,7 +20,6 @@ queue = amplify(1., override="replay_gain", queue)
set("harbor.bind_addr", "0.0.0.0")
#TODO: Need to create a randomized password for every instance
web_stream = input.harbor("test-harbor",port=8999,password="hackme")
current_dyn_id = ref ''
pypo_data = ref '0'
@ -39,6 +38,9 @@ just_switched = ref false
%include "ls_lib.liq"
web_stream = input.harbor("test-harbor",port=8999,password="hackme")
web_stream = on_metadata(notify_stream, web_stream)
queue = on_metadata(notify, queue)
queue = map_metadata(append_title, queue)
# the crossfade function controls fade in/out