From a92956108860855588867dc2d34dbd366649fc8c Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Tue, 16 Oct 2012 11:59:37 -0400 Subject: [PATCH 1/2] CC-4565: Pypopush: Error happens when trying to insert a song right behind a Webstream as well as that Webstream is just finished -make sure we don't return a negative when calculating interval seconds --- python_apps/pypo/pypopush.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index aaacc1687..87e1704bf 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -399,7 +399,15 @@ class PypoPush(Thread): def date_interval_to_seconds(self, interval): - return (interval.microseconds + (interval.seconds + interval.days * 24 * 3600) * 10 ** 6) / float(10 ** 6) + """ + Convert timedelta object into int representing the number of seconds. If + number of seconds is less than 0, then return 0. + """ + seconds = (interval.microseconds + \ + (interval.seconds + interval.days * 24 * 3600) * 10 ** 6) / float(10 ** 6) + if seconds < 0: seconds = 0 + + return seconds def push_to_liquidsoap(self, event_chain): From b061573d233a6716d83088a14e1cd25ca8fa881b Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 16 Oct 2012 12:04:52 -0400 Subject: [PATCH 2/2] CC-4554: Playout History search sticks on 'Processing' message -fixed --- airtime_mvc/application/models/PlayoutHistory.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/models/PlayoutHistory.php b/airtime_mvc/application/models/PlayoutHistory.php index ba845fa33..7da1ff2c2 100644 --- a/airtime_mvc/application/models/PlayoutHistory.php +++ b/airtime_mvc/application/models/PlayoutHistory.php @@ -16,12 +16,12 @@ class Application_Model_PlayoutHistory private $opts; private $mDataPropMap = array( - "artist" => "file.artist_name", - "title" => "file.track_title", - "played" => "playout.played", - "length" => "file.length", - "composer" => "file.composer", - "copyright" => "file.copyright", + "artist" => "artist_name", + "title" => "track_title", + "played" => "played", + "length" => "length", + "composer" => "composer", + "copyright" => "copyright", ); public function __construct($p_startDT, $p_endDT, $p_opts)