Skip to content

Conversation

@auouymous
Copy link
Member

This changes the download progress icon to a paused icon when an episode is in the pausing or paused states.

@blushingpenguin Will it cause any issues to not recycle the paused task?

@blushingpenguin
Copy link
Contributor

@auouymous I don't think that will cause any issues, but I would suggest moving the check into the recycle function itself. (This wouldn't make any difference currently as recycle is only called with the task in the cancelled state, but if future code is added that calls recycle it might also need the special case)

I also noticed that this patch introduces a change in behaviour in that in the episode list previously you could choose to download a paused task from the context menu and now you can cancel it instead -- I think it should have both really to be consistent. I've got a chunk of the way through adding that support (it works, but needs more testing -- I can probably finish that off this weekend). I don't think that should block your change but it seems nice to have.

@auouymous
Copy link
Member Author

Ok, I'll move the check inside recycle, it will give the function more purpose. Also, is there a reason failed tasks are removed (recycled) from episodes? It seems like any task listed on the progress page, other than cancelled, should still have the task in the episode, correct?

#1162 was meant to resolve that behavior change in a better way. Displaying Resume on the menu would make more sense than Download. And adding the ability to pause from the menu would be an enhancement.

@blushingpenguin
Copy link
Contributor

Yes, I think keeping the task connected to the episode as long as it is in the downloads list makes sense. I'm not sure why it gets disconnected/reconnected currently.

For #1162 are you actively working on that? I don't want to duplicate your efforts. I put the stuff I was playing around with in https://github.com/blushingpenguin/gpodder/tree/pause_resume (it's unfinished!) in case that helps.

@auouymous
Copy link
Member Author

It would be a couple weeks before I could get to #1162, so feel free to work on it.

@auouymous
Copy link
Member Author

Regarding your pause_resume branch, do the menu items not update quickly because blushingpenguin@08c3f11#diff-d613a1eb3f5e3e0fba9c6219fc0e8048f88b23de799b5c6f20a30628067529e2R461 isn't also checking the PAUSING state?

@auouymous auouymous merged commit ab61a04 into gpodder:master Oct 6, 2021
@auouymous auouymous deleted the paused-episode-icon branch October 6, 2021 01:48
@auouymous
Copy link
Member Author

@blushingpenguin Changing the line in my last comment to return task.status in (task.PAUSED, task.PAUSING) updates menu and toolbar instantly.

play_or_download() needs to return an additional False.

-             return (False, False, False, False, False)
+             return (False, False, False, False, False, False)

The can_pause would be better between can_download and can_cancel since that is how it appears in the menu.

The patch appears to be working fine after removing the changes in download.py and gtkui/model.py, and fixing the two issues above. It only needs to replace the download button with a resume button, and add pause/resume buttons to the toolbar.

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

Successfully merging this pull request may close these issues.

2 participants