New episodes coming from feedparser no longer overwrite
the ones that are already in the database, but update
them properly, keeping states and file size.
Old episodes used to be kept in the database, but not displayed.
This patch removes all episodes beyond the max_episodes_per_feed
limit, which weren't downloaded.
channels_to_model() was issuing 3 SQL queries per channel to
get episode statistics (the number of downloaded, new and unplayed
episodes). This is now done with one query for all channels.
3 temporary views are created when the database is first open.
This not only affects the startup time, but also the time required
to finish a download, change settings -- everything that renews
the list of channels.
When the list of episodes for a channel was displayed, all episodes
were loaded with a single query, then loaded separately by one
inside podcastItem.iter_set_downloading_columns(). This patch
fixes this problem, the TreeModel is built with only one SQL query.
On the same machine a TreeModel for 50 episodes was displayed in
1.915531 seconds, with this patch: 0.236303 (8 times faster).
If an episode is marked as deleted but the corresponding file somehow
still exists in the file system, this code was "resurrecting" the
episode, and vice-versa for downloaded episodes that lack their files.
Questionable behaviour, because a situation like that can only mean
an error somewhere, and this code was just making it harder to track
the real problem, and added unnecessary FS interaction.
Changes to the database are only commited after a channel is added,
updated or when all downloads are finished, but not during episode
related operations. The threaded feed updater benefits the most
from this change.
libpodcasts.py: Moved a bunch of code from channels_to_model to
update_channel_model_by_iter, a new method which allows updating of
individual iters in a model.
gui.py: Added only_selected_channel option to updateComboBox which makes it
only update the selected channel's iter. This saves a bit of time when doing
simple tasks like marking an episode as played. So far only playback_episode
and for_each_selected_episode_url take advantage of this option.
For me this is very useful. It eliminates the need to create a
playlist or open EasyTag to edit the genre.
Using this option I just transfer to my player and select the genre
Podcast to view all my synchronized podcasts.
Updated README, version info in bin/gpodder and manpage.
Removed icon conversion in Makefile.
Refresh messages.pot and all translation files.
Don't resize gPodder icon in the about dialog.
Enjoy this new feature-packed release of gPodder :)
Updated the look of gPodder's "green man" icon in all
sizes (16, 22, 24, 26, 40, 48, 64) and add the SVG
sources for the smaller-size icons as developer docs.
For text/html content types, try to discover the correct
RSS/Atom feed URL by looking at the <link> meta elements
and getting the feed URL from that. If that fails, or if
there are not <link> meta elements, make sure that the UI
code can display the "This URL is a website" message box
that will allow the user to open a web browser window to
search for the feed URL manually.
Based on a patch by Justin Forest.
gui.py: Add "block" keyword argument to add_new_channel which essentially
makes the channel adder behave like the old, non-threaded version. Without
this, when adding channels from the OPML lister the new episodes window
shows that there is nothing to download.
Just citing the discussion between me and nikosapi in #gpodder:
16:56 <sheskar> nikosapi: I've looked into bug #168.
16:57 <sheskar> nikosapi: I guess the problem is that in _track_on_device() in
sync.py we check if a podcastItem is equal to a string.
16:59 <sheskar> I don't know exactly how to fix it, though.
17:47 <nikosapi> sheskar: change line 218 from "return
self._track_on_device(episode)" to "return
self._track_on_device(episode.title)"
Allow switching the notebook tabs in the main window by
pressing Ctrl + Page Up and Ctrl + Page Down.
Thanks to Justin Forest for suggesting this feature on
the gpodder-devel mailing list.
Unfortunately it's currently not possible to open the menu entries
with Alt+Letter (except "Help"). The attached patch fixes that for
the main entries.
Removed the LockingCursor subclass, added explicit
calls to cur.close() to avoid race conditions.
No more "library routine called out of sequence" errors.
With the new threaded feed cache updater, we only want to
set the color in our ListStore of channels when the model
is available already. This isn't the case on startup.
Thanks to Bernd Schlapsi for reporting this bug on Bugzilla.
Reword the confirmation dialog when deleting episodes from
iPods and MP3 players, so the user knows that the episodes
are only going to be removed from the device, and not from
the gPodder library.
This change has been suggested in the May 2008 User Test.
When exporting the subscription list to an OPML file,
show a success message with the number of podcasts exported,
so the user knows that everything went well.
This change has been suggested in the May 2008 User Test.
This changeset is based on gPodder-r777-threaded-feed-updater.patch, plus:
config.py: Add new config option 'max_simulaneous_feeds_updating'. By default
it's set to 3, otherwise on slower devices the gui might become un-responsive
during an update because of the CPU resources required by python-feedparser.
Add 'color_updating_feeds' option for users that want to manually set it.
gui.py: Make channels that are updating a different color, this gives the user
a better idea of what's going on. Populate the update progress bar with a
message and clear the previous fraction setting before starting a feed update.
Colors dict for feed updates, default color is "None", so we don't need to do
any fancy color detection (for all different GTK themes).
libpodcasts.py: Make the channel's iter available as podcastChannel.iter.
Don't use the <span foreground=...> markup tag to set the channel's text
color, use the gtk.CellRendererText 'foreground' attribute. This allows
the text color to be easily changed by modifying the channel model.
Require the colors dict to be passed to channels_to_model.
For Maemo, add "Update selected podcast" menu item to the Subscriptions menu,
because the context menu isn't easily reached at the moment (no right-click).
Make iPodDevice in gpodder.sync fail if libgpod is not
available (i.e. not installed) by checking if gpod is
available. If not, don't try to open the iPod.
Thanks to Vincent for reporting this in our Bugzilla.
On Maemo, gtk.gdk.WINDOW_STATE_ICONIFIED doesn't seem to work but
gtk.gdk.WINDOW_STATE_WITHDRAWN works pretty well. With this change
if the gPodder window is minimized to the tray (hidden) then the
self.minimized flag is set to true.
(Without this, auto-update doesn't work reliably)
Add support for sort columns in the gPodderEpisodeSelector.
If a sort attribute is specified, it will create a hidden sort column.
This patch also changes each call to this episode selector.
Replace the forward slash ("/") in the channel and episode
title with a dash ("-") to prevent episode title text from
being stripped.
Apply a modified version of a patch by Mel Jay to fix problems
with duplicate episode names, and try to find free names when
the filename already exists.
Thanks to Mel Jay for reporting this bug in gPodder Bugzilla
gdfs-init.py has stopped working because of the changes
in load_channels, from the SQLite changes. This makes the
gdfs-init.py script work as expected.
Fix problem when the image item in an RSS feed does not
contain a valid link to the image by checking for the
existence of the image link before trying to access it.
Bug reported by Adam on the gPodder Bugzilla
When getting the title of the main window initially,
it has the value "None" on Maemo. Fix this by checking
for this value and using "gPodder" instead.
The FancyURLopener by default ignores HTTP errors and
downloads the HTTP error page without letting the calling
code know. We override the method and report the error
in our subclass, so we can provide feedback to the user
in the logfile and in a message dialog.
This bug has been reported by Markus Golser
When downloading an episode, and the urllib progress
callback reports a totalSize of "-1", gPodder would show
large negative values for the download progress. This is
fixed by using the size reported by the feed in this case
and also adding some sanity checks (progress between the
values 0 and 100) and spitting out warnings in case of
problems.
This bug has been reported by Heinz Erhard
The on_treeAvailable_row_activated function had some of
its parameters removed in one of the last commits, which
prevents the preferences dialog from opening when double-
clicking an episode in the available episode list.
Makes the SQLite interaction thread safe, required for threaded
feed updates and other threaded things that are coming. The changes
are completely internal and do not affect the usage. Also, some
commit() calls were removed (after selects, where they did nothing).
When a non-audio and non-video podcast episode is selected,
we now replace all "Play" buttons/items with an "Open" button
or item, so opening PDFs and non-media files in podcasts is
more straightforward (you "open" a PDF, you don't "play" it).
Original request from Stefan Lohmaier, gPodder bug 18