CC-3610: Now Playing ->songs in the Now Playing do not reflect the changes affected changed END_OF_SHOW

-pypo side fixed
This commit is contained in:
Martin Konecny 2012-04-10 23:13:52 -04:00
parent bc6e911673
commit a09a31bc88
2 changed files with 15 additions and 7 deletions

View file

@ -524,12 +524,13 @@ class Application_Model_Schedule {
foreach ($items as $item){
$storedFile = Application_Model_StoredFile::Recall($item["file_id"]);
$uri = $storedFile->getFilePath();
$showEndDateTime = new DateTime($item["show_end"], $utcTimeZone);
$trackStartDateTime = new DateTime($item["start"], $utcTimeZone);
$trackEndDateTime = new DateTime($item["end"], $utcTimeZone);
if ($trackStartDateTime->getTimestamp() > $showEndDateTime->getTimestamp()){
continue;
}
/* Note: cue_out and end are always the same. */
/* TODO: Not all tracks will have "show_end" */
@ -537,8 +538,12 @@ class Application_Model_Schedule {
$di = $trackStartDateTime->diff($showEndDateTime);
$item["cue_out"] = $di->format("%H:%i:%s").".000";
$item["end"] = $showEndDateTime->format("Y-m-d H:i:s");
}
$storedFile = Application_Model_StoredFile::Recall($item["file_id"]);
$uri = $storedFile->getFilePath();
$start = Application_Model_Schedule::AirtimeTimeToPypoTime($item["start"]);
$data["media"][$start] = array(
'id' => $storedFile->getGunid(),