diff --git a/airtime_mvc/application/models/airtime/PodcastEpisodes.php b/airtime_mvc/application/models/airtime/PodcastEpisodes.php index c78bbe6ea..eea1f7311 100644 --- a/airtime_mvc/application/models/airtime/PodcastEpisodes.php +++ b/airtime_mvc/application/models/airtime/PodcastEpisodes.php @@ -32,7 +32,7 @@ class PodcastEpisodes extends BasePodcastEpisodes if ($podcast) { $fileId = $this->getDbFileId(); $key = Application_Model_Preference::getStationPodcastDownloadKey(); - return Application_Common_HTTPHelper::getStationUrl(false)."rest/media/$fileId/download?download_key=$key"; + return Application_Common_HTTPHelper::getStationUrl(false)."rest/media/$fileId/download/$key"; } return parent::getDbDownloadUrl(); } diff --git a/airtime_mvc/application/modules/rest/Bootstrap.php b/airtime_mvc/application/modules/rest/Bootstrap.php index 2d84354e4..11a9b2fae 100644 --- a/airtime_mvc/application/modules/rest/Bootstrap.php +++ b/airtime_mvc/application/modules/rest/Bootstrap.php @@ -60,14 +60,15 @@ class Rest_Bootstrap extends Zend_Application_Module_Bootstrap /** MediaController Routes **/ $downloadRoute = new Zend_Controller_Router_Route( - 'rest/media/:id/download', + 'rest/media/:id/download/:download_key', array( 'controller' => 'media', 'action' => 'download', 'module' => 'rest' ), array( - 'id' => '\d+' + 'id' => '\d+', + 'download_key' => '\w*' ) ); $router->addRoute('download', $downloadRoute);