Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into cc-5709-airtime-analyzer-cloud-storage-saas
Conflicts: airtime_mvc/application/models/Schedule.php
This commit is contained in:
commit
97b74a0997
7 changed files with 42 additions and 25 deletions
|
@ -768,7 +768,19 @@ SQL;
|
|||
}
|
||||
}
|
||||
|
||||
private static function createFileScheduleEvent(&$data, $item, $media_id, $uri, $object_name=null)
|
||||
/**
|
||||
*
|
||||
* Appends schedule "events" to an array of schedule events that gets
|
||||
* sent to PYPO. Each schedule event contains information PYPO and
|
||||
* Liquidsoap need for playout.
|
||||
*
|
||||
* @param Array $data array to be filled with schedule info - $item(s)
|
||||
* @param Array $item schedule info about one track
|
||||
* @param Integer $media_id scheduled item's cc_files id
|
||||
* @param String $uri path to the scheduled item's physical location
|
||||
* @param String $amazonS3ResourceId scheduled item's Amazon S3 resource id, if applicable
|
||||
*/
|
||||
private static function createFileScheduleEvent(&$data, $item, $media_id, $uri, $amazonS3ResourceId)
|
||||
{
|
||||
$start = self::AirtimeTimeToPypoTime($item["start"]);
|
||||
$end = self::AirtimeTimeToPypoTime($item["end"]);
|
||||
|
@ -804,8 +816,8 @@ SQL;
|
|||
'replay_gain' => $replay_gain,
|
||||
'independent_event' => $independent_event
|
||||
);
|
||||
if (!is_null($object_name)) {
|
||||
$schedule_item["object_name"] = $object_name;
|
||||
if (!is_null($amazonS3ResourceId)) {
|
||||
$schedule_item["amazonS3_resource_id"] = $amazonS3ResourceId;
|
||||
}
|
||||
|
||||
if ($schedule_item['cue_in'] > $schedule_item['cue_out']) {
|
||||
|
@ -938,15 +950,11 @@ SQL;
|
|||
//row is from "file"
|
||||
$media_id = $item['file_id'];
|
||||
$storedFile = Application_Model_StoredFile::RecallById($media_id);
|
||||
|
||||
$file = $storedFile->getPropelOrm();
|
||||
$uri = $file->getAbsoluteFilePath();
|
||||
$amazonS3ResourceId = $file->getResourceId();
|
||||
|
||||
$object_name = null;
|
||||
if ($file instanceof CloudFile) {
|
||||
$object_name = $storedFile->getResourceId();
|
||||
}
|
||||
self::createFileScheduleEvent($data, $item, $media_id, $uri, $object_name);
|
||||
self::createFileScheduleEvent($data, $item, $media_id, $uri, $amazonS3ResourceId);
|
||||
}
|
||||
elseif (!is_null($item['stream_id'])) {
|
||||
//row is type "webstream"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue