Commit graph

317 commits

Author SHA1 Message Date
Thomas Perl 522631d851 GTK UI: Simplify "Played" and "New" (bug 1330) 2011-07-05 18:32:48 +02:00
Thomas Perl b0f24a0bcb Add episode context menu hook, refactor playback code 2011-06-08 11:04:29 +02:00
Thomas Perl 477119df01 Refactoring: Remove "published" from PodcastChannel
This field wasn't used at all in gPodder's UI or backend.
2011-04-28 21:11:59 +02:00
Thomas Perl 1a813a4c90 GTK UI: Configurable columns in episode list 2011-04-11 13:09:50 +02:00
Thomas Perl 5a1ead792f Better generation of one-line description 2011-04-10 23:00:32 +02:00
Thomas Perl 4ca74bb5e2 Fix audio/video detection for Linux Outlaws 2011-04-04 18:00:14 +02:00
Thomas Perl dc9ddb9ac6 Better GUID tracking with fallback URL (Maemo bug 12073)
Thanks to Jonas Kölker for the initial patch.
2011-04-04 11:43:53 +02:00
Thomas Perl 4376057001 Update copyright years 2011-04-01 18:59:53 +02:00
Thomas Perl b425ce95e1 Fallback to link if no guid exists (Maemo bug 12073) 2011-04-01 14:12:23 +02:00
Thomas Perl 7ca2abf126 Fix a bug with adding set and list values 2011-04-01 12:16:27 +02:00
Thomas Perl dfcf76737f QML UI: Proper cover art caching/downloading
Thanks to hhartz on IRC for suggesting using image
providers for fine-tuning QML image loading.
2011-03-25 19:41:57 +01:00
Thomas Perl b3e44e1e5f Fix YouTube QML streaming; cover downloading 2011-03-22 16:19:31 +01:00
Thomas Perl da77a4b898 Fix a bug when finding externally-downloaded files 2011-03-11 12:49:34 +01:00
Thomas Perl 65cb840771 Decode strings to unicode before slicing (bug 1277)
Simplified fix; based on a patch by Justin Forest.

(merged from the gPodder 2.x branch)
2011-02-28 20:28:13 +01:00
Thomas Perl 199874ca35 Refactor is_locked -> archive in PodcastEpisode 2011-02-26 16:48:48 +01:00
Thomas Perl ea02c40e08 Refactor is_played -> not is_new in PodcastEpisode 2011-02-26 16:32:34 +01:00
Thomas Perl c68edb6a03 Clean up and improve local_filename()
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).
2011-02-25 23:27:59 +01:00
Thomas Perl c69f14b167 Move Gtk-specific code from gpodder.model to gpodder.gtkui.model
This is analogous to the way the QML UI adds its
additional code to the model base classes, and
improves modularity and decreases the core size.
2011-02-25 21:14:54 +01:00
Thomas Perl d9a4963669 Use only "cgi.escape" for escaping Pango markup
Replace the usage of saxutils.escape with cgi.escape.
2011-02-25 21:05:26 +01:00
Thomas Perl 77f0c8b707 Remove obsolete M3U-generating code 2011-02-25 20:58:38 +01:00
Thomas Perl ca02aca587 Don't move .partial files into "Unknown" folder 2011-02-25 19:14:43 +01:00
Thomas Perl 9714ef8188 Implement import of externally-downloaded files (bug 902)
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.
2011-02-25 00:45:49 +01:00
Thomas Perl 997bb2dfcc Add support for remembering last playback time
This makes it possible to get "recently listened
to" episodes from the database, and reload the
last-listened-to episode from the database.
2011-02-11 16:25:56 +01:00
Thomas Perl f02063beea Don't show "finished" in the position display 2011-02-11 15:57:03 +01:00
Thomas Perl 38b650ff79 First cut of playback tracking support 2011-02-06 13:46:20 +01:00
Thomas Perl 4e09b984f8 Support for grouping podcasts by content type 2011-02-04 19:06:20 +01:00
Thomas Perl 097d1c0a05 Fix getting episodes from DB via filename 2011-02-01 17:44:08 +01:00
Thomas Perl 0fc540c3b7 Remove GStreamer-based track length detection 2011-02-01 17:36:24 +01:00
Thomas Perl 0f5a45bc42 Reference PodcastEpisode only on model.Model 2010-12-20 15:48:29 +01:00
Thomas Perl b04ca2c58a PodcastChannel: Remove save_dir_size 2010-12-20 15:28:52 +01:00
Thomas Perl b7109c4301 Cleanup: Simplify delete_from_disk + cover_file 2010-12-20 15:26:11 +01:00
Thomas Perl dedc1d1aba Remove direct references to PodcastChannel and PodcastEpisode
This will come in handy when subclassing the model classes.
2010-12-20 15:17:48 +01:00
Thomas Perl be1c1114a2 Show filesize after download has finished 2010-12-20 15:00:41 +01:00
Thomas Perl 5a5ff375f3 Remove obsolete properties in PodcastEpisode
Simplify the episode selector list code.
2010-12-20 14:51:20 +01:00
Thomas Perl 292c82ab00 Database schema cleanup / upgrade 2010-12-20 14:35:46 +01:00
Thomas Perl 3e59385337 Remove sync_to_devices from podcast channel 2010-12-20 11:15:29 +01:00
Thomas Perl 8012c4f6bb Remove portable device synchronization 2010-12-20 10:29:41 +01:00
Thomas Perl e3e4a81272 Merge download_dir and gpodder.home 2010-12-20 03:09:35 +01:00
Thomas Perl cc58ca6646 Remove deprecated statistics properties of channel 2010-12-20 01:59:34 +01:00
Thomas Perl e131e5a40c Remove device_playlist_name from podcast channel 2010-12-20 01:58:08 +01:00
Thomas Perl d95d3ae1f6 Remove config option: allow_empty_feeds 2010-12-20 00:54:19 +01:00
Thomas Perl c183a73b9e Fix a bug with type-less content in feeds
Thanks to @baltha on identi.ca for reporting this
bug for http://www.2600.com/oth-broadband.xml
2010-12-16 12:02:13 +01:00
Thomas Perl 73d34b1446 Nicer download filenames for Soundcloud streams 2010-12-06 01:49:40 +01:00
Thomas Perl d455e8e690 Remove unused statistics code for feed update 2010-11-22 20:09:54 +01:00
Thomas Perl 2994c2e15d Improve episode list loading 2010-11-20 23:45:07 +01:00
Thomas Perl 2ccd3f5d4f Sort entry list before cutting it off (bug 1186)
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.
2010-10-30 01:06:48 +02:00
Thomas Perl 8b6e55c529 Maemo 5: Add "Select finished" for delete episode 2010-10-05 11:22:59 +02:00
Thomas Perl 6f60142580 Better classification of "finished" episodes 2010-09-30 12:37:06 +02:00
Thomas Perl 291df31e66 Use <content:encoded> from feeds (bug 1144) 2010-09-27 01:32:17 +02:00
Thomas Perl b785d1113f Add per-podcast pause subscription option (bug 1050) 2010-09-27 00:08:30 +02:00
Thomas Perl 83a6f36e28 Replace whitespace in titles with single space (Maemo bug 11173)
This should make the episode and podcast list
nicer for feeds that have newlines and spaces
in their titles. It also fixes a bug in the
episode list for Maemo.
2010-08-27 14:32:15 +02:00
Thomas Perl 8476d480fa Fix a podcast object creation bug 2010-08-23 23:58:25 +02:00
Thomas Perl 5614fbf569 Fix sorting in "Delete episodes" dialog (bug 1113)
The "Downloaded" column sorts correctly now.
2010-08-23 23:31:47 +02:00
Thomas Perl 04b300ad2d Support mime type preferences list (bug 995)
Add a new configuration option that controls the
ordering of mime types when multiple enclosures
(file formats) are available in a podcast feed.

Based on an initial patch by Bernd Schlapsi.
2010-08-20 23:36:57 +02:00
Thomas Perl 84b00c8cc1 Basic support for FM4 XSPF playlists 2010-08-20 22:44:06 +02:00
Thomas Perl 82e5f51768 Playback multiple files on Maemo (bug 1037)
Create a temporary M3U playlist and send its
filename to the Nokia Media Player, as this
is the only way to open multiple files at once
with the built-in Media Player.
2010-07-18 20:55:08 +02:00
Thomas Perl 3caa9858dd Refactor user extensions into "hooks" (bug 425)
Refactor Justin's "User extensions" code to make it
a bit more cleaner and documented, and rename it to
"hooks", as this more precisely describes the nature
of the mechanism.
2010-07-05 16:08:22 +02:00
Justin Forest ef81517f6d Initial support for user extensions (bug 435)
Currently this only lets you do something with
channels and episodes before they are saved,
e.g. modify titles. Can be extended easily to
provide more functions.

Loads $GPODDER_HOME/extensions/*.py, see src/gpodder/userext.py
for details.
2010-07-05 15:03:32 +02:00
Thomas Perl 76ff7737fd Maemo 5: Fix "Finished" display for some MP3s
When playing back some MP3s, the player sends a
position that is greater than the total time. In
this case, we still want to display "Finished".
2010-06-30 03:00:48 +02:00
Thomas Perl bd21be1bea Delete M3U when removing a podcast (bug 1063)
When a podcast has its downloaded files removed,
the M3U playlist file corresponding to the podcast
should also be removed from the filesystem.
2010-06-28 16:03:54 +02:00
Thomas Perl 425f626826 Show "Finished" status in episode action dialog
When an episode has been played, show "Finished"
and the duration for the playback status button.
2010-06-12 19:17:49 +02:00
Thomas Perl 8466636cd6 Faster episode searching by URL/filename
Implement a faster method for acquiring the
episode object from a download URL or filename.

This improves performance for episode status
updates and episode metadata requests over D-Bus.
2010-06-12 18:08:57 +02:00
Thomas Perl c60cc44434 Maemo 5: File size and duration in episode actions
If known, show the download size and episode duration (and
possibly current position) as values on the buttons of the
episode actions dialog.
2010-06-12 15:56:01 +02:00
Thomas Perl 7c20ffd167 Determine episode duration (bug 811)
This patch adds two methods for detecting the
episode length (time units, not bytes):

 * iTunes-specific "duration" in the RSS feed
 * GStreamer-based length detection after download

The patch also adds duration information to the
tooltip in the episode list as a first step for
displaying this information in the UI.
2010-06-04 20:43:38 +02:00
Thomas Perl 31392dea96 YouTube videos have a website link
In case the link of a YouTube episode points
to itself, we allow it to be the website URL.
2010-06-02 11:03:38 +02:00
Thomas Perl 5a16cd38e4 Skip images if other content is available (bug 979)
In case where RSS feeds provide multiple enclosures
per item, we want to skip all image feeds, because
we prefer audio/video content to plain images.
2010-05-18 11:31:01 +02:00
Thomas Perl cf44f7c30e Code cleanup: Remove unused imports 2010-05-17 18:26:13 +02:00
Thomas Perl 33a6930fb3 Fix a regression for custom feeds (e.g. Soundcloud)
Refactoring introduced a bug where new episodes were
never found on custom feeds such as Soundcloud.
2010-04-29 13:47:19 +02:00
Thomas Perl 5756e9791c Fix empty mimetype in feeds (Maemo bug 10036) 2010-04-29 13:04:45 +02:00
Thomas Perl 90b20f2984 Final database module code clean-ups 2010-04-26 23:57:50 +02:00
Thomas Perl 3d8f369356 New implementation of load_episodes() 2010-04-26 22:38:02 +02:00
Thomas Perl 82262b1aab Special implementation of load_episode() 2010-04-26 22:17:22 +02:00
Thomas Perl 1be902f2ea Quicker saving of downloaded episodes
This temporarily disables updating the M3U files
until we find a more efficient way updating them.
2010-04-26 21:41:50 +02:00
Thomas Perl aa74b161e7 Refactor delete_episode_by_url -> delete_episode 2010-04-26 21:17:35 +02:00
Thomas Perl 47d8231153 Remove dead code (count_* in model.PodcastChannel) 2010-04-26 20:41:08 +02:00
Thomas Perl 5a33ce0353 Refactor database module and add new columns
Clean-up the database module for easier adding and
removal of columns to the podcast and episode tables.

Add time-related information (total time, position and
timestamp for the last position update) to episodes.

Remove the "deleted" column for podcasts and make sure
to remove all "deleted" podcasts and their episodes when
upgrading from an older version of gPodder.
2010-04-24 18:51:19 +02:00
Thomas Perl 8b6eac8276 Add support for streaming YouTube videos
This might not work with all media players,
but it worked for me with some basic tests.
2010-04-03 00:39:43 +02:00
Thomas Perl 1302145a99 Don't show "0.0 B" on Maemo (episode selector) 2010-03-23 14:34:17 +01:00
Thomas Perl 2b3a2aa743 Don't mark old episodes as new on update (bug 340)
Another attempt at finally fixing bug 340, but this time I'm pretty sure
that it works, because we are more selective now.

Whenever a new episode appears in the feed, its date is compared to the
date of the newest-known episode in the same feed. If it's more than one
week older than the newest-known episode, it's marked as old by default.

The "one week" value is just a randomly-chosen one to allow for border
cases (like a daily podcast re-issuing an episode of the last few days)
to work correctly and not cause "missing episodes".
2010-03-11 19:41:29 +01:00
Thomas Perl d2ff21b1d4 Streamline feed parsing (should be faster now) 2010-02-28 14:50:01 +01:00
Thomas Perl 04680ba8ac More robust lock counting (bug 874)
Thanks to Ville-Pekka Vainio for forwarding this.
2010-02-23 15:44:17 +01:00
Thomas Perl f5c4b388a6 Playback episodes in chronological order (bug 832)
When multiple episodes are selected, and the "playback episodes"
function is used, we now sort the episodes in ascending chronological
order before passing the list of episodes to the media player.

Thanks to Xavier for reporting this bug.
2010-02-05 21:03:34 +01:00
Thomas Perl da7d8b3282 Remove filename discover code (bug 821)
The filename will be updated by the download
module whenever the download has finished and
the file_disposition header contains a proper
name. This is easier (and also gets rid of the
blocking operation during filename discovery)
than what we did before, which (I believe) also
led to an error that Shane Kerr was seeing in
gPodder bug 821.
2010-02-05 20:45:52 +01:00
Thomas Perl 43e3118496 Look for cover art in more places (bug 746)
I've streamlined the URL/HREF detection code
for the <image> tag and added support for the
atom:icon element.

See also:
http://atompub.org/rfc4287.html#element.icon
2010-01-07 23:16:40 +01:00
Thibauld Nion 07db946dc1 Try harder to find podcast cover art (bug 746)
Some feeds describe their "cover" image in a
<image><url>...</url></image> tag. This patch
should make it possible to properly detect and
fetch images in these cases as well.
2010-01-07 23:03:45 +01:00
Thibauld Nion 689431fede Accept images as enclosures (bug 740)
Make it so that "episodes" that are actually
made of simple images are detected as valid
downloadable episodes.
2010-01-07 22:09:44 +01:00
Thomas Perl 181564f1b7 Add 2010 to the years in copyright notice
The following command has been used:

grep -r '2005-2009 Thomas Perl and the gPodder Team' * | cut -d: -f1 |
xargs sed -i -e 's/2005-2009 Thomas Perl and the gPodder Team/2005-2010
Thomas Perl and the gPodder Team/g'
2010-01-02 17:35:42 +01:00
Thomas Perl 4c5bf203da Use folder.jpg for cover art (bug 283)
Right now, the name "folder.jpg" is used
regardless of whether or not the file is
indeed a JPEG file.
2009-12-27 14:12:39 +01:00
Thomas Perl fed0cbc545 Make the Maemo 5 shownotes window view-only
This removes all the progress bars and action
buttons (except "Visit website") from the
dialog, as this functionality is going to be
moved in a separate dialog for easier access.
2009-12-22 01:26:44 +01:00
Thomas Perl 3223efd0c1 Fremantle text styles for podcast and episode list
Split the text formatting into a separate function
and let the Fremantle module override it in a
subclass that's used in the main UI. Probably needs
some more fine-tuning, but the basic framework is
now in place.

Thanks to Mox and Tuomas for their input.
2009-12-22 00:24:26 +01:00
Thomas Perl 930461bc65 Folder names must not end in dots (bug 600)
On Windows, a folder name like "Abc..." is
saved as "Abc", and trying to create such a
folder name works, but the trailing dots are
removed. When trying to download files to such
a folder (while gPodder still believes the
folder has dots at the end), this won't work.

To fix this bug, don't allow trailing dots in
the folder name of podcasts by stripping them.

Thanks to Yves for reporting this bug.
2009-12-12 14:28:18 +01:00
Thomas Perl 3d939ed485 New config option: "allow_empty_feeds" (bug 569)
If this option is set to True, gPodder will accept feeds
that do not have any episodes listed. This is useful for
cases where podcasts do not have episodes throughout the
year, but will have new episodes eventually.

Thanks to Steve for reporting this bug in Bugzilla.
2009-12-12 14:04:28 +01:00
Thomas Perl d765146bd3 Refactor soundcloud module support 2009-12-04 00:14:29 +01:00
Thomas Perl 3bf38383f7 Custom handler support + Soundcloud integration
This is still a work-in-progress, but it works
fine for me so far. Still needs lots of work to
be more accessible and robust.

You can use the "sc:" prefix to add Soundcloud
users (or use http://soundcloud.com/username).
2009-12-04 00:14:29 +01:00
Thomas Perl d98bfe5c5a Remove podcast column from episode selector
The podcast name is now displayed in the episode
column to save space (just like it was on Maemo
already).
2009-12-03 23:53:16 +01:00
Thomas Perl 8a8b38d27e Remove empty playlist files when updating M3Us 2009-10-13 18:43:54 +02:00
Thomas Perl b5a13f1935 Add support for blogs with MP3 links
This should make some previously-broken feeds
appear as podcast, even though they are not
really. Please don't expect too much from this
feature, but it seems to make some users happy.
2009-10-13 14:19:40 +02:00
Thomas Perl 4af2e0682f Fix problems with get_real_url() (bug 573)
Don't fail hard when we cannot get the real
URL of an episode while searching for files.

Only partially fixes bug 573, as the reporter
has posted the traceback in the wrong bug.
2009-09-28 16:03:15 +02:00
Thomas Perl b0c25dd5fe Sort episodes in M3U by ascending pubDate (bug 579)
Thanks to Dan Ramos for reporting this bug.
2009-09-28 15:34:10 +02:00
Thomas Perl f954691797 Remove episodes that have been removed from the feed (bug 458)
Episode that have not been downloaded (or have been
deleted since) and that do not appear in the feed are
now purged from the database after a feed update to
avoid the database getting filled with orphaned episodes.

Based on a patch by Neal Cox.
2009-09-28 15:00:38 +02:00
Thomas Perl 36f42f702f Support marking episodes new/old in Fremantle 2009-09-21 23:34:12 +02:00
Thomas Perl 96a7378339 Hide new cover files by default 2009-09-15 19:33:55 +02:00
Thomas Perl cff1cd3b8f Fix bug that results in "None" filename 2009-09-15 14:23:38 +02:00
Thomas Perl 3464c5d347 Disallow adding non-podcast feeds (bug 554)
Also fixed some YouTube-related problems that
caused the bug and now needed some refactoring.
2009-09-09 19:53:26 +02:00
Thomas Perl d94251bc42 Bugfix for downloaded YouTube videos (Maemo bug 5058)
If the file has been downloaded, get the extension
for file type determination from the local filename.

Thanks to Victor for reporting this bug.
2009-09-08 23:36:44 +02:00
Thomas Perl c73db9e587 New, separate episode selector for Maemo 4 2009-09-08 21:35:36 +02:00
Thomas Perl c45da9e33a Support for "Content-disposition" header (RFC 2138)
Add support for renaming files according to the
Content-disposition header after download has
completed and correct mimetype based on the name.
2009-09-06 16:38:40 +02:00
Thomas Perl 8148074f85 Support for hiding "boring" podcasts in podcast list
This adds a new checkbox in the "View" menu that allows
the user to hide all podcasts in the podcast list for
which the episode list is empty (probably because some
filter is active).
2009-09-01 18:56:30 +02:00
Thomas Perl c0a4c50d5a Delete entries in database when unsubscribing (bug 541)
As long as the "Keep downloaded episodes" checkbox is
not checked, we now delete episodes and the podcast from
the database when unsubscribing from a podcast.

Thanks to slestak989 for reporting this issue.
2009-09-01 15:26:00 +02:00
Thomas Perl a860f5786e Option to disable feed update skipping (bug 542)
There is now a new configuration option called
feed_update_skipping (default: Enabled) that can
be used to disable skipping of feeds during update.

Also, skipping of feeds is only done when there
are more than one podcasts to be updated (this
allows the context-menu "update single feed" to
work as a kind of "force update" menu item).

Thanks to Sebastian Krause for the bug report.
2009-09-01 14:18:24 +02:00
Thomas Perl 90cda4b56b Rename gpodder.resolver to gpodder.youtube and clean it up
Remove the GTK+ dependency in gpodder.youtube by making the
only function that is in there fake a opml.Importer-like object,
so we can use the model from gpodder.gtkui.opml to display the
results instead of generating the model inside gpodder.youtube.
2009-08-24 17:02:35 +02:00
Thomas Perl 94513d4365 Refactor CoverDownloader to gtkui.services
This makes the gpodder.services module GTK+-free, and
also removes the global state object cover_downloader.
2009-08-24 16:47:59 +02:00
Thomas Perl 996b2bcda2 Improve HTTP authentication handling (bug 525)
Add some additional code and checks to make the use
of password-protected podcasts more stable and easier
to use. Thanks to Dan Ramos for the bug report.
2009-08-24 13:04:11 +02:00
Morten Nygaard Åsnes b35c3411f3 Re-use existing folder names for podcasts (bug 519)
When looking for a unique foldername, reuse existing
names if they belongs to a deleted channel with a
non-existing download folder.
2009-08-24 00:17:59 +02:00
Morten Nygaard Åsnes e0e127fe92 Fix PodcastChannel.set_custom_title (bug 519)
Here is a patch that mostly fixes the problem. But I
still get a few cases where setting the channel title
causes the directory to be named 'Something (2)' etc.
2009-08-24 00:06:11 +02:00
Thomas Perl 0680c075bb Fix bug when creating PodcastChannel objects
This prevented new feeds from being added.
2009-08-18 17:48:09 +02:00
Thomas Perl ef90e09b90 Split libpodcasts in model and gtkui.model modules
Create "gpodder.gtkui" package that will contain all
modules that support the GTK+-based user interface.

libpodcasts has been renamed to "model" and is now
GTK+-clean, so it does not require the GTK+ module.
2009-08-13 23:36:18 +02:00
Renamed from src/gpodder/libpodcasts.py (Browse further)