Merge branch 'saas-dev-publishing' of github.com:sourcefabric/Airtime into saas-dev-publishing
This commit is contained in:
commit
ba832ffe3a
10 changed files with 52 additions and 16 deletions
|
@ -1573,6 +1573,11 @@ class Application_Model_Preference
|
|||
}
|
||||
|
||||
public static function getStationPodcastPrivacy() {
|
||||
if (!Billing::isStationPodcastAllowed()) {
|
||||
// return private setting
|
||||
return 1;
|
||||
}
|
||||
|
||||
return self::getValue("station_podcast_privacy");
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,11 @@ class PodcastEpisodes extends BasePodcastEpisodes
|
|||
$podcast = StationPodcastQuery::create()->findOneByDbPodcastId($podcastId);
|
||||
if ($podcast) {
|
||||
$fileId = $this->getDbFileId();
|
||||
// FIXME: this is an interim solution until we can do better...
|
||||
$file = CcFilesQuery::create()->findPk($fileId);
|
||||
$ext = FileDataHelper::getAudioMimeTypeArray()[$file->getDbMime()];
|
||||
$key = Application_Model_Preference::getStationPodcastDownloadKey();
|
||||
return Application_Common_HTTPHelper::getStationUrl(false)."rest/media/$fileId/download/$key";
|
||||
return Application_Common_HTTPHelper::getStationUrl()."rest/media/$fileId/download/$key.$ext";
|
||||
}
|
||||
return parent::getDbDownloadUrl();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue