From 79141fa070cdcb8a93cb69b91b5e7ff06255dece Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 12 Jan 2012 12:14:38 -0500 Subject: [PATCH] CC-3240: When playlist is longer than a show, the now playing bar shows as if the playlist is still playing after show ends -Fixed --- airtime_mvc/application/models/Nowplaying.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/Nowplaying.php b/airtime_mvc/application/models/Nowplaying.php index b59bb4e6a..618ae3080 100644 --- a/airtime_mvc/application/models/Nowplaying.php +++ b/airtime_mvc/application/models/Nowplaying.php @@ -27,7 +27,9 @@ class Application_Model_Nowplaying $status = ($dbRow['show_ends'] < $dbRow['item_ends']) ? "x" : ""; $type = "a"; - $type .= ($itemEndDateTime->getTimestamp() > $epochNow && $itemStartDateTime->getTimestamp() <= $epochNow) ? "c" : ""; + $type .= ($itemStartDateTime->getTimestamp() <= $epochNow + && $epochNow < $itemEndDateTime->getTimestamp() + && $epochNow < $showEndDateTime->getTimestamp()) ? "c" : ""; // remove millisecond from the time format $itemStart = explode('.', $dbRow['item_starts']);