* SAAS-1161 - refactor backend so episodes are loaded separately from podcast data to speed up loading and improve API readability

* Decouple imported and station podcast behaviour on the frontend
This commit is contained in:
Duncan Sommerville 2015-11-02 18:07:16 -05:00
parent c4be9aebb2
commit def8e7280b
9 changed files with 312 additions and 256 deletions

View file

@ -54,8 +54,7 @@ class PodcastManager {
* @return array array of episodes to append be downloaded
*/
protected static function _findUningestedEpisodes($podcast, $service) {
$podcastArray = Application_Service_PodcastService::getPodcastById($podcast->getDbPodcastId());
$episodeList = $podcastArray["episodes"];
$episodeList = $service->getPodcastEpisodes($podcast->getDbPodcastId());
$episodes = array();
usort($episodeList, array(static::class, "_sortByEpisodePubDate"));
for ($i = 0; $i < sizeof($episodeList); $i++) {