Sitelet https://github.com/gpodder/gpodder/pull/1252
Skip to content

Refactor play_or_download() episode action code. - #1252

Merged
auouymous merged 1 commit into
gpodder:masterfrom
auouymous:fix-1248-cancel-failed-tasks
Mar 24, 2022
Merged

auouymous merged 1 commit into
gpodder:masterfrom
auouymous:fix-1248-cancel-failed-tasks

Conversation

@auouymous

Copy link
Copy Markdown
Member

Streaming was always possible (#867) for all audio and video episodes if an audio player was configured. Now it is only possible if a player is configured for the episode's type.

Methods have been added to PodcastEpisode that are either now used by actions or replicate the conditions used by actions to filter selections. This will help prevent mismatched conditions between play_or_download() and episode actions. And play_or_download() is easier to reason about and should prevent future bugs such as #1250.

Fixes #1250.

Streaming was always possible (gpodder#867) for all audio and video episodes if
an audio player was configured. Now it is only possible if a player is
configured for the episode's type.

Methods have been added to PodcastEpisode that are either now used by
actions or replicate the conditions used by actions to filter
selections. This will help prevent mismatched conditions between
play_or_download() and episode actions. And play_or_download() is easier
to reason about and should prevent future bugs such as gpodder#1250.

Fixes gpodder#1250.

@elelay elelay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elelay

elelay commented Mar 21, 2022

Copy link
Copy Markdown
Member

Still an issue with the Cancel button when the Progress tab is active after cancelling a task:

  1. start downloading
  2. go to progress tab
  3. select downloading task
  4. click cancel
  5. task shown as cancelled in the list
  6. Cancel is not disabled

@auouymous

Copy link
Copy Markdown
Member Author

This PR is only for the episode list actions. I have a partial fix for the progress tab cancel button/menutiem but needed to shelve it while fixing my mistake from #1250. There is also an issue with the Open/Play/Preview/Stream button/menuitems when using a mixed selection that will need to be dealt with later.

@elelay

elelay commented Mar 23, 2022

Copy link
Copy Markdown
Member

ok, so merge it when you want.
Thanks,

@auouymous
auouymous merged commit b4d23aa into gpodder:master Mar 24, 2022
@auouymous
auouymous deleted the fix-1248-cancel-failed-tasks branch March 24, 2022 00:41
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.

Failed downloads can not be re-downloaded or deleted.

2 participants