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
This commit is contained in:
Martin Konecny 2012-01-12 12:14:38 -05:00
parent d1de836a92
commit 79141fa070
1 changed files with 3 additions and 1 deletions
airtime_mvc/application/models

View File

@ -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']);