Undelete deleted episodes when a download is attempted.

In the event of a download failure, the error icon will properly
display, and the episode will remain undeleted after a restart for
another download attempt.
This commit is contained in:
auouymous 2022-03-08 17:38:50 -07:00
parent 0bf859bf21
commit d0ad77b9a7
1 changed files with 3 additions and 0 deletions

View File

@ -3113,6 +3113,9 @@ class gPodder(BuilderWidget, dbus.service.Object):
logger.debug('Downloading episode: %s', episode.title)
if not episode.was_downloaded(and_exists=True):
episode._download_error = None
if episode.state == gpodder.STATE_DELETED:
episode.state = gpodder.STATE_NORMAL
episode.save()
task_exists = False
for task in self.download_tasks_seen:
if episode.url == task.url: