Make PodcastChannel.update() return a list of new episodes. Add a new
config variable ui.gtk.only_added_are_new. If this variable is True,
download, queue or show (depending on the value of config var
auto_download) only these new episodes, instead of all episodes marked
as new, after an update.
Fixes flake8 error F401.
Most errors were fixed by running
autoflake -i -r --remove-all-unused-imports .
which also removes unnecessary 'pass' statements, some by hand-editing.
Add 'custom_downloader' member var to DownloadTask. Use it in
episode.get_playback_url() to get a preview file name.
Also add episode.can_preview() method and use it in ep.can_play().
PR #1094 generated an HTML description for any episode that lacked one.
That however increased the database size (almost double in worst case)
because it was storing both text and html versions of each description.
This fixes that by storing the episode thumbnail URL in the database and
generating the HTML description only when shownotes are drawn.
The text description is now cleared for episodes with an HTML
description. This further reduces database size for feeds that provide
both. It also fixes an issue for feeds that provide different text and
HTML descriptions, because the short description would show the text
description and shownotes would show the HTML description. And EQL only
searched the text descriptions, which might not match what the user sees
in the shownotes.
* Fix#864 add undownload checkbox in delete episode confirm dialog
don't mark episodes new if we don't delete them now
when a mix of downloaded and not downloaded and old episodes
are selected
Non-media RSS feeds only have a textual description and can't be
subscribed to in gpodder. Some media feeds lack downloadable content and
can only be accessed from the website. In both cases, gpodder removes
the episodes without any feedback to the user as to why, making it
appear to be a problem in gpodder.
This patch adds those episodes but prevents automatic download and
displays a proper error when a manual download is attempted. The
episodes also get a web browser icon to indicate they lack downloadable
content. While not downloadable or transferable to media devices,
gpodder can be used to notify the user when new episodes are available
and they can be accessed by clicking through to the website
Fixes an issue with the toolbar cancel button turning off and on when
entering the progress tab, even though it can't cancel anything until a
selection is made.
Properly cancels failed tasks manually removed from progress tab. Not
cancelling would leave the error icon and prevent downloading or
cancelling.
The download, pause and cancel actions in toolbar and Episodes
menu can now be used to control downloads in the progress tab. The
delete menu item in Episodes menu removes the download from list. This
also allows keyboard accelerators to be used, such as the Delete key
for removing tasks. Accelerators for cancel, and maybe download/pause,
should added in a future PR.
The progress tab context menu now has the same ordering as the other
menus.
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.
Internal youtube support and the youtube-dl extension both cause the
youtube feed URL to be fetched three times per update. Caching the feed
data from feedcore allows internal support to only load the feed once.
The lru_cache removes one of the youtube-dl fetches, not perfect, but
two is better than three. I saw a 40% decrease in update times when
using the internal youtube code.
Throwing an exception from get_channel_id_url() prevents get_cover() and
get_channel_desc() from attempting to fetch a None URL, and provides
more accurate errors.
The lru_cache on get_youtube_id() saves 1ms per youtube channel when
updating. Which adds up with a lot of channels, and might be more on
slower devices.
The duration is not available in the youtube feed and requires a request
for each episode. It was set when downloading but the user had no way of
knowing how long an episode was before downloading it. Live streams do
not have a duration until they end, and remain blank until downloaded or
the next update.
This will increase the time it takes to update feeds, with new
subscriptions possibly taking 16x longer to update due to the 16
requests vs the previous single request. Updating existing feeds
will only have an additional request for each new episode.
The youtube-dl extension code is moved into gPodder to provide this
feature for all feeds lacking an html description. This enables
clickable links inside non-html descriptions. And if available, an image
tag for the episode art URL is prepended to the html description
(currently only available in html shownotes).
now a requests.Response is returned instead of the file-like object from urllib.
Fixed all usages of util.urlopen: it simplifies getting json, text encoding detection.
In particular feedcore (responsible for fetching feeds) is simplified.
This is a first pass and could benefit from better usage of the requests api
(Sessions for instance, to keep connection pools)
TODO: download.py