Skip to content

Commit

Permalink
Don't purge in-progress downloads (bug 1534)
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Jan 6, 2012
1 parent cd5db4b commit c0de335
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gpodder/model.py
Expand Up @@ -1070,10 +1070,11 @@ def _consume_updated_feed(self, feed, max_episodes=0, mimetype_prefs=''):
def remove_unreachable_episodes(self, existing, seen_guids, max_episodes):
# Remove "unreachable" episodes - episodes that have not been
# downloaded and that the feed does not list as downloadable anymore
# Keep episodes that are currently being downloaded, though (bug 1534)
if self.id is not None:
episodes_to_purge = (e for e in existing if \
e.state != gpodder.STATE_DOWNLOADED and \
e.guid not in seen_guids)
episodes_to_purge = (e for e in existing if
e.state != gpodder.STATE_DOWNLOADED and
e.guid not in seen_guids and not e.downloading)

for episode in episodes_to_purge:
logger.debug('Episode removed from feed: %s (%s)',
Expand Down

0 comments on commit c0de335

Please sign in to comment.