Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress icon doesn't appear when downloading a failed or paused episode #649

Closed
auouymous opened this issue Aug 5, 2019 · 1 comment
Closed

Comments

@auouymous
Copy link
Member

If a download fails or is paused, its progress icon won't appear the next time it is downloaded. But cancelling the progress entry will properly display the icon on next download. The problem is that episode.download_task is only set when a DownloadTask is created, but resuming a download reuses a recycled DownloadTask, and doesn't store it in the episode.

diff --git a/src/gpodder/download.py b/src/gpodder/download.py
index 1b7b54fa..5288912b 100644
--- a/src/gpodder/download.py
+++ b/src/gpodder/download.py
@@ -739,6 +739,10 @@ class DownloadTask(object):
         self.status = DownloadTask.DOWNLOADING
         self._notification_shown = False
 
+        # Store a reference to this task in the episode
+        if not self.episode.downloading:
+            self.episode.download_task = self
+
         try:
             # Resolve URL and start downloading the episode
             fmt_ids = youtube.get_fmt_ids(self._config.youtube)
@elelay elelay closed this as completed in a7385c9 Aug 11, 2019
@elelay
Copy link
Member

elelay commented Aug 11, 2019

thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants