Merge pull request #1244 from auouymous/undelete-episode-on-download

Undelete deleted episodes when a download is attempted.
This commit is contained in:
auouymous 2022-03-15 15:06:45 -07:00 committed by GitHub
commit bc65930578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -3141,6 +3141,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: