-
-
Notifications
You must be signed in to change notification settings - Fork 217
#1117, #1137: fixes for pause/resume/cancelling download tasks #1149
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
Conversation
|
@auouymous I've fixed the lint issue and I've also fixed a (reintroduced) race when queuing multiple items -- if you had hit that when testing then cancel/pause/resume would have been broken (it wasn't hard to hit). I have also tried the test in #1147 (download from https://www.youtube.com/user/BBCRadio1VEVO, let it fail, enable youtube-dl and retry the download) which worked for me. |
|
Also there is (at least) one issue left here, if you restart a download that gets removed from the active downloads list then it is impossible to cancel/pause it. This can be done by starting two downloads (A+B), cancelling A, waiting for A to be cancelled, cancelling B, quickly right clicking on A, waiting for the downloads list to be cleared and then choosing A from the context menu for the vanished item. The task is no longer in the 'download_tasks_seen' list and this means that attempts to manipulate it fail, but it carries on in the background. |
|
The cancelling issue is fixed but #1147 is not. Are you letting the download finish? It fails both ways for me, using |
|
#1152 is another issue. |
Yes, I let it finish. I'm using https://www.youtube.com/user/BBCRadio1VEVO as the feed, then right clicking on |
|
My fault, #1044 is causing #1147. I don't know how it is working for you, or how it was working for me when I reverted the #1054 patch. The failed attempt deletes the empty partial file and the youtube-dl extension calls |
Original PR #1149 by blushingpenguin Original: gpodder/gpodder#1149
…g download tasks Merged from original PR #1149 Original: gpodder/gpodder#1149
For review/test -- I have tried to fix the race conditions in pause/resume/cancel/restarting downloads here. The main thing that this does is to introduce two new states, pausing and cancelling which allow the download task (which is running on a background thread) to transition itself to the paused/cancelled state, and also locks the task while the state is being manipulated. I think that the idea is basically sound but there are probably some issues left.