Temporary fix to make enclosure urls iTunes compatible

This commit is contained in:
Duncan Sommerville 2015-11-17 21:06:51 -05:00
parent ef87ad8a51
commit eae8c7b638
4 changed files with 25 additions and 8 deletions

View file

@ -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(false)."rest/media/$fileId/download/$key.$ext";
}
return parent::getDbDownloadUrl();
}