Skip to content

Commit

Permalink
CC-5318 : Playout History: The last song of the show will display wro…
Browse files Browse the repository at this point in the history
…ng end time.
  • Loading branch information
naomiaro committed Sep 1, 2013
1 parent 619dbf7 commit 4a4ef27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion airtime_mvc/application/services/HistoryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,14 @@ public function insertPlayedItem($schedId) {
$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) {
Expand Down

0 comments on commit 4a4ef27

Please sign in to comment.