From 4c58c4c9a92169f57b883c09fc9f165f54f855c5 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Tue, 18 Sep 2012 15:23:26 -0400 Subject: [PATCH] CC-4473: On Air button greys out when one out of two same Webstreams is cancelled -fixed --- airtime_mvc/application/models/Schedule.php | 1 + airtime_mvc/application/models/Webstream.php | 2 +- python_apps/pypo/liquidsoap_scripts/ls_script.liq | 2 ++ python_apps/pypo/pypopush.py | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index 5e92ca514..eff64b2ec 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -696,6 +696,7 @@ SQL; 'start' => $start, 'end' => $end, 'show_name' => $item["show_name"], + 'row_id' => $item["id"], 'independent_event' => true ); self::appendScheduleItem($data, $start, $schedule_item); diff --git a/airtime_mvc/application/models/Webstream.php b/airtime_mvc/application/models/Webstream.php index 561f97b12..45d3caf9a 100644 --- a/airtime_mvc/application/models/Webstream.php +++ b/airtime_mvc/application/models/Webstream.php @@ -216,9 +216,9 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable } // TODO : Fix this interface + //This function should not be defined in the interface. public function setMetadata($key, $val) { - //This function should not be defined in the interface. throw new Exception("Not implemented."); } diff --git a/python_apps/pypo/liquidsoap_scripts/ls_script.liq b/python_apps/pypo/liquidsoap_scripts/ls_script.liq index 87e7fbc89..649943a19 100644 --- a/python_apps/pypo/liquidsoap_scripts/ls_script.liq +++ b/python_apps/pypo/liquidsoap_scripts/ls_script.liq @@ -41,11 +41,13 @@ stream_harbor_pass = list.hd(get_process_lines('pwgen -s -N 1 -n 20')) web_stream = input.harbor("test-harbor", port=8999, password=stream_harbor_pass) web_stream = on_metadata(notify_stream, web_stream) +output.dummy(fallible=true, web_stream) queue = on_metadata(notify, queue) queue = map_metadata(update=false, append_title, queue) # the crossfade function controls fade in/out queue = crossfade(queue) +output.dummy(fallible=true, queue) stream_queue = switch(id="stream_queue_switch", track_sensitive=false, diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index 4defee3e9..aaacc1687 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -191,7 +191,7 @@ class PypoPush(Thread): if self.current_stream_info is None: correct = False else: - correct = self.current_stream_info['uri'] == media_item['uri'] + correct = self.current_stream_info['row_id'] == media_item['row_id'] self.logger.debug("Is current item correct?: %s", str(correct)) return correct