Skip to content

Commit

Permalink
gpodder.model: Do not add files without filename
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Jan 30, 2014
1 parent fa2104d commit 7ad8417
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gpodder/model.py
Expand Up @@ -818,7 +818,11 @@ def check_download_folder(self):
for episode in self.get_episodes(gpodder.STATE_DOWNLOADED):
if episode.was_downloaded():
filename = episode.local_filename(create=False)
if filename is not None and not os.path.exists(filename):
if filename is None:
# No filename has been determined for this episode
continue

if not os.path.exists(filename):
# File has been deleted by the user - simulate a
# delete event (also marks the episode as deleted)
logger.debug('Episode deleted: %s', filename)
Expand Down

0 comments on commit 7ad8417

Please sign in to comment.