Bugfixes and more work on station podcast frontend

This commit is contained in:
Duncan Sommerville 2015-10-22 18:03:38 -04:00
parent 58a7b9324b
commit e8980e7a79
9 changed files with 82 additions and 56 deletions

View file

@ -170,8 +170,12 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
public function publish($fileId) {
$id = Application_Model_Preference::getStationPodcastId();
$url = $guid = Application_Common_HTTPHelper::getStationUrl()."rest/media/$fileId/download";
$e = $this->_buildEpisode($id, $url, $guid, date('r'));
$e->setDbFileId($fileId)->save();
if (!PodcastEpisodesQuery::create()
->filterByDbPodcastId($id)
->findOneByDbFileId($fileId)) { // Don't allow duplicate episodes
$e = $this->_buildEpisode($id, $url, $guid, date('r'));
$e->setDbFileId($fileId)->save();
}
}
/**