CC-4321: NowPlaying: Cancelling Webstream has no effect and results in OnAir being grayed out

-set DbEnds to 1 second in the past when cancelling stream
This commit is contained in:
Martin Konecny 2012-08-30 17:52:39 -04:00
parent f9dca67376
commit 79b6d13c16
2 changed files with 5 additions and 2 deletions

View File

@ -605,7 +605,7 @@ SQL;
}
// Scheduler wants everything in a playlist
$items = Application_Model_Schedule::GetItems($range_start, $range_end);
$items = self::GetItems($range_start, $range_end);
$data = array();
$utcTimeZone = new DateTimeZone("UTC");

View File

@ -660,9 +660,12 @@ class Application_Model_Scheduler
$cueOutSec = bcadd($cueinSec , $length, 6);
$cueout = Application_Common_DateHelper::secondsToPlaylistTime($cueOutSec);
//Set DbEnds - 1 second because otherwise there can be a timing issue
//when sending the new schedule to Pypo where Pypo thinks the track is still
//playing.
$removedItem->setDbCueOut($cueout)
->setDbClipLength($cliplength)
->setDbEnds($this->nowDT)
->setDbEnds($this->nowDT->sub(new DateInteval("PT1S")))
->save($this->con);
} else {
$removedItem->delete($this->con);