* SAAS-1182 - added sanity checks and additional logic to rss import and episode generation

* SAAS-1184 - started work on podcast UI polishing
* Fixed pull request issues
This commit is contained in:
Duncan Sommerville 2015-11-09 18:17:49 -05:00
parent 1bc0f9e54b
commit 0360b5e460
8 changed files with 59 additions and 32 deletions

View file

@ -288,6 +288,12 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
$episodesArray = array();
foreach ($rss->get_items() as $item) {
// If the enclosure is empty, this isn't a podcast episode
$enclosure = $item->get_enclosure();
$url = $enclosure instanceof SimplePie_Enclosure ? $enclosure->get_link() : $enclosure["link"];
if (empty($url)) {
continue;
}
$itemId = $item->get_id();
$ingested = in_array($itemId, $episodeIds) ? (empty($episodeFiles[$itemId]) ? -1 : 1) : 0;
$file = $ingested > 0 && !empty($episodeFiles[$itemId]) ?