From 8caf02e71347530747e3afa22efb5d911a3b1e07 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Sat, 7 Mar 2015 15:01:52 +0100 Subject: [PATCH] Allow refreshing single podcast --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index fb3f06e..08695ba 100644 --- a/main.py +++ b/main.py @@ -137,6 +137,7 @@ class gPotherSide: 'coverart': self._get_cover(podcast), 'updating': podcast._updating, 'section': podcast.section, + 'url': podcast.url, } def _get_podcasts_sorted(self): @@ -305,13 +306,13 @@ class gPotherSide: self.core.save() @run_in_background_thread - def check_for_episodes(self): + def check_for_episodes(self, url=None): if self._checking_for_new_episodes: return self._checking_for_new_episodes = True pyotherside.send('refreshing', True) - podcasts = self._get_podcasts_sorted() + podcasts = [podcast for podcast in self._get_podcasts_sorted() if url is None or podcast.url == url] for index, podcast in enumerate(podcasts): pyotherside.send('refresh-progress', index, len(podcasts)) pyotherside.send('updating-podcast', podcast.id)