This adds incomplete support for video podcasts from The Escapist.
The Podcast is added, with cover art and all, but the episodes still don't show up to test
if it's possible to download.
I'm finally migrating from gpodder 2 to 3, and when starting up gpodder3
after running the migration, I ran into the following uncaught exception
(which aborted gpodder):
TypeError: coercing to Unicode: need string or buffer, NoneType found
Users can now use the following fields to customize the
sync filename when using MP3 player device sync:
{episode.pubdate_year} - Year of publication (without century)
{episode.pubdate_month} - Month of publication (01-12)
{episode.pubdate_day} - Day of publication (01-31)
In addition to these fields, {episode.sortdate} is still
provided and gives YYYY-MM-DD as result (just like before).
1) Redid the youtube video format list (added fallbacks for each quality
setting) and added a new config key youtube.preferred_format_ids, that
accepts a list of supported quality ids.
2) Added a GUI setting switcher that lets a user pick between predefined
video quality settings and respects the 'custom' setting. 'Custom'
should currently only be used if the user prefers 3D formats or 3GP.
All other variants are in the normal settings with sane fallbacks.
Existing users will not feel any change (current fmt=18 default is
respected). Only the default fallback for get_real_download_url() was
changed (to 720p), but that will never be called unless the user clears
her youtube.preferred_fmt_id variable.
This improves the prefix elimination code by also
checking if the episode title begins with the title
of the podcast, followed by either ' - ' or ': '.
While this is usually covered by the common prefix
elimination anyway, it's not covered by situations
where there are a few episodes that have a different
name (e.g. happens for the 43 Folders podcast now).
This changeset makes gPodder's codebase convertable
to Python 3 using the "2to3" utility. Right now, only
the CLI module (bin/gpo) has been tested.
See the README file for instructions and remarks.
Determine the common prefix after a feed update
and after adding a new feed (in these cases, the
common prefix isn't determined yet or could
change depending on the titles of new episodes).
Also fix problems where common prefix elimination
has only chopped off parts of the first word of a
title when it should only chop off full words.
This is closely modelled around the YouTube module.
In the future, we should probably remodel this to
use the extensions/hooks/plugins mechanism, and make
the interface for video services more generic.
Up to now, the episodes from non-feed sources (Soundcloud
and XSPF) would pile up forever, because they were never
deleted from the database, even if they were removed from
the original feed. This is now fixed using the same mechanism
as the one for normal feeds: If an episode GUID is not found
in the feed, it is removed from the database.
When the feed is redirected, we usually simply rewrite
the URL. However, if the new URL already exists in the
subscriptions, we must not allow this, and ideally
fail to update the feed to avoid duplicates.
Instead of initializing woodchuck explicitly, let the
hooks module know then the UI has been initialized,
and provide some callbacks (that Woodchuck needs, but
which could be used by other hook scripts) and the model.
- Add an __init__ method to Model taking the DB to model.
- Make get_podcasts and load_podcast instance methods rather than
class methods. Don't require that the caller pass the DB to use.
- Update users.
- Have Core.__init__ take an additional parameter, model_class.
Instantiate a model from self.db using the provided model_class.
Add the following hooks in hooks.py:
- on_podcast_subscribe
- on_podcast_update_failed
- on_podcast_delete
- on_episode_delete
- on_episode_remove_from_podcast
Call them as appropriate (in model.py)
We have only checked if audio and/or video is available in
normal enclosures. This check is now extended to Media RSS
items, because there are feeds that have the image as
enclosure and the media file as Media RSS content.
Example feed: http://www.rtl.fr/emission/a-la-bonne-heure.rss
Thanks to Ilkka Laukkanen for the initial feature
request and for Kurt McKee and Stefan Kögl for the
implementation in feedparser (since 5.0).
This feature will only work with feedparser >= 5.0,
but will gracefully degrade (ignore RSS redirects)
with older versions of feedparser.
The algorithm is a very primitive one, but it
worked okay-ish so far for the Gtk UI. It is
now used by both the Gtk UI and the QML UI, and
any improvements to the algorithm can be shared.
This makes it possible to fix 931 later on - right
now, users cannot edit the section names in the UI,
but only via editing the database file directly.
Remove obsolete code parts, merge code paths for
easier readability. Make filename check based on
podcast ID (so files in different folders can have
the same name).
This only works for files that are still available in the
feed, and for which the filename can be determined easily.
For files that are supported (e.g. proper feeds and most
YouTube user channels), the import will happen automatically.
Command line users can use the new "gpo importfiles" command.
Other files that cannot be identified will be moved into
the 'Unknown' subfolder, so future versions or external
utilities can look at those files and import them.
The max_episodes_per_feed setting should prevent too many episodes in a
single podcast (which slows down processing and loading of the episode
list). In cases where the feed lists all episodes in chronological order
(oldest first), the feed will at some point (episodes in the feed >=
max_episodes_per_feed) stop showing new episodes.
This patch fixes this by (trying to) sort the entries by update time,
descending and only then cutting of the entry list.