CC-5318 : Playout History: The last song of the show will display wrong end time.

This commit is contained in:
Naomi Aro 2013-09-01 17:59:47 -04:00
parent 619dbf7bbf
commit 4a4ef2767e
1 changed files with 5 additions and 1 deletions

View File

@ -526,10 +526,14 @@ class Application_Service_HistoryService
$metadata = array();
$metadata["showname"] = $show->getDbName();
$instanceEnd = $showInstance->getDbEnds(null);
$itemEnd = $item->getDbEnds(null);
$recordEnd = ($instanceEnd < $itemEnd) ? $instanceEnd : $itemEnd;
$history = new CcPlayoutHistory();
$history->setDbFileId($fileId);
$history->setDbStarts($item->getDbStarts(null));
$history->setDbEnds($item->getDbEnds(null));
$history->setDbEnds($recordEnd);
$history->setDbInstanceId($item->getDbInstanceId());
foreach ($metadata as $key => $val) {