-
-
Notifications
You must be signed in to change notification settings - Fork 217
fixes #1152 and an odd corner case #1155
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
|
Is the second issue #1149 (comment)? |
|
@auouymous Yes, that is the second issue |
|
I'm unable to cancel failed downloads (the 'ccc' episodes at http://borg.qzx.com/test-rss.php always fail). |
…paths (and hopefully is easier to follow)
I have fixed this one |
|
Thanks for looking at this |
|
Thanks for fixing these issues. |
|
Thank you both for your hard work making things work again after the switch to gio! |
To fix the task queue re-ordering, this basically reverts the chunk of #1054 that added a second thread safe tasks queue and goes back to using the Gtk.ListStore to contain the tasks work queue. To workaround the problem of the background download threads triggering exceptions when concurrently accessing the list store while the main ui thread is manipulating it, only the main ui thread accesses the list store, and background worker threads queue a request for a task to the main thread by adding an idle function which dequeues a task, then sends the result back to the background thread (via the DequeRequest class).
This also fixes the corner case of downloading a task that no longer exists. That can be triggered by downloading some episodes, then in the tasks list cancelling one of the downloads. Once cancellation has finished, cancel all other downloads, then quickly right click on the cancelled task to get the context menu. Wait until the other tasks have been cancelled and the tasks list has been cleared, then choose to download the cancelled task -- at this point the task is in the queued state, not in the list (and hence not in the queue) but attached to the episode,so it becomes impossible to download the episode that the task is attached to. This is fixed by detecting the case of the task not being in the tasks list and adding it back in if necessary.