gpodder.model: Do not add files without filename
This commit is contained in:
parent
fa2104de1f
commit
7ad8417989
1 changed files with 5 additions and 1 deletions
|
@ -818,7 +818,11 @@ class PodcastChannel(PodcastModelObject):
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue