Merge branch 'saas-dev' into saas-showbuilder

This commit is contained in:
Albert Santoni 2015-08-24 16:53:32 -04:00
commit e188fcde32
5 changed files with 17 additions and 21 deletions

View file

@ -1441,7 +1441,8 @@ class Application_Model_Preference
// SAAS-876 - Toggle indicating whether user is using custom stream settings
public static function getUsingCustomStreamSettings() {
return self::getValue("using_custom_stream_settings");
$val = self::getValue("using_custom_stream_settings");
return empty($val) ? false : $val;
}
public static function setUsingCustomStreamSettings($value) {

View file

@ -1019,9 +1019,11 @@ SQL;
$media_id = $item['file_id'];
$storedFile = Application_Model_StoredFile::RecallById($media_id);
$file = $storedFile->getPropelOrm();
$uri = $file->getAbsoluteFilePath();
//Even local files are downloaded through the REST API in case we need to transform
//their filenames (eg. in the case of a bad file extension, because Liquidsoap won't play them)
$uri = Application_Common_HTTPHelper::getStationUrl() . "/rest/media/" . $media_id;
//$uri = $file->getAbsoluteFilePath();
$baseUrl = Application_Common_OsPath::getBaseDir();
$filesize = $file->getFileSize();
self::createFileScheduleEvent($data, $item, $media_id, $uri, $filesize);
}