* Wrap station podcast feed contents on radio page in displayRssTab check

* Test fix for automatic ingest bug
* Move disable layout code in feeds controller to avoid error case
This commit is contained in:
Duncan Sommerville 2015-10-28 10:58:22 -04:00
parent 09efacf4d5
commit cc9f1ea6d0
4 changed files with 12 additions and 5 deletions

View file

@ -51,12 +51,11 @@ class PodcastManager {
$episodeList = $podcastArray["episodes"];
$episodes = array();
// Sort the episodes by publication date to get the most recent
usort($episodeList, array(static::class, "_sortByEpisodePubDate"));
// usort($episodeList, array(static::class, "_sortByEpisodePubDate"));
for ($i = 0; $i < sizeof($episodeList); $i++) {
$episodeData = $episodeList[$i];
// If the publication date of this episode is before the ingest timestamp, we don't need to ingest it
// Since we're sorting by publication date, we can break
if (strtotime($episodeData["pub_date"]) < strtotime($podcast->getDbAutoIngestTimestamp())) break;
if (strtotime($episodeData["pub_date"]) < strtotime($podcast->getDbAutoIngestTimestamp())) continue;
$episode = PodcastEpisodesQuery::create()->findOneByDbEpisodeGuid($episodeData["guid"]);
// Make sure there's no existing episode placeholder or import, and that the data is non-empty
if (empty($episode) && !empty($episodeData)) {