CC-3220: Stream Setting: Status box is stuck on waiting if nothing is

changed and click save

- done
- liquidsoap_update_error and liquidsoap_update_connection functions are
combined into one function, liquidsoap_update_status, in various place
- created various telnet commands in liquidsoap( connection check for each
stream, connection status for all streams)
- In liquidsoap, shoutcast stream doesn't use default id. It is more
informative by using id with "shoutcast_stream_#{stream_number}
This commit is contained in:
james 2011-12-24 10:59:09 -05:00
parent 9665c970af
commit c9c6a08a1c
8 changed files with 94 additions and 71 deletions

View file

@ -37,15 +37,17 @@ def to_live(old,new) =
end
def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, description, genre, user, s, stream) =
def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, description, genre, user, s, stream, connected) =
def on_error(msg)
system("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --error='#{msg}' --stream-id=#{stream} --time=#{time}")
log("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --error='#{msg}' --stream-id=#{stream} --time=#{time}")
connected := "false"
system("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --error='#{msg}' --stream-id=#{stream} --time=#{!time}")
log("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --error='#{msg}' --stream-id=#{stream} --time=#{!time}")
5.
end
def on_connect()
system("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --connect --stream-id=#{stream} --time=#{time}")
log("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --connect --stream-id=#{stream} --time=#{time}")
connected := "true"
system("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --connect --stream-id=#{stream} --time=#{!time}")
log("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --connect --stream-id=#{stream} --time=#{!time}")
end
if output_type == "icecast" then
user_ref = ref user
@ -136,7 +138,8 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de
if url == "" then
url_ref := "N/A"
end
output.shoutcast = output.shoutcast(host = host,
output.shoutcast = output.shoutcast(id = "shoutcast_stream_#{stream}",
host = host,
port = port,
password = pass,
fallible = true,