Merge branch '2.2.x' of dev.sourcefabric.org:airtime into 2.2.x

This commit is contained in:
James 2012-11-20 16:39:04 -05:00
commit 8d9fa1976e
1 changed files with 9 additions and 1 deletions

View File

@ -674,6 +674,12 @@ SQL;
$start = self::AirtimeTimeToPypoTime($item["start"]);
$end = self::AirtimeTimeToPypoTime($item["end"]);
list(,,,$start_hour,,) = explode("-", $start);
list(,,,$end_hour,,) = explode("-", $end);
$same_hour = $start_hour == $end_hour;
$independent_event = !$same_hour;
$schedule_item = array(
'id' => $media_id,
'type' => 'file',
@ -687,7 +693,7 @@ SQL;
'end' => $end,
'show_name' => $item["show_name"],
'replay_gain' => is_null($item["replay_gain"]) ? "0": $item["replay_gain"],
'independent_event' => false
'independent_event' => $independent_event,
);
self::appendScheduleItem($data, $start, $schedule_item);
}
@ -859,6 +865,8 @@ SQL;
$data = array();
$data["media"] = array();
//Harbor kick times *MUST* be ahead of schedule events, so that pypo
//executes them first.
self::createInputHarborKickTimes($data, $range_start, $range_end);
self::createScheduledEvents($data, $range_start, $range_end);