Makes it easier to maintain the sync-related UI code
and also allows for removal of the sync-related code
on environments where sync is unnecessary (Maemo!).
Some modules are still left that need some more refactoring.
These are: gui.py and libpodcasts.py.
All other modules now have their dependency on gPodderLib or
the config object (almost all really just depend on the config
object) injected instead of accessing a global variable.
This does not really work for some people, so we simply
remove that functionality again. I personally don't need
that as I don't have an iPod anymore, so I can't support
it either. If anyone wants to support that feature, feel free.
Updating tags of files should be done in the post-download
hook, this makes gPodder a bit slimmer. If we wanted the
tag update functionality, we should utilize a proper library
that is able to update tags for all media files (mutagen?).
When I sort on the Copied-column in the Remove podcasts dialog, it sorts
in lexicographical order. Also, files copied within the last day only
show an empty string.
This patch fixes these issues.
This should fix the problem of files not appearing or
being playable on Sansa Clip MTP devices.
Thanks to Gianpaolo Racca for feedback and suggestions.
This makes the sync dialog show the correct count of
episodes that will be transferred to the device when
there are files that are not going to be synced.
Thanks to Götz Waschk for reporting this bug.
Do not install gettext globally, but have a gettext
function in the gpodder module and import it from all
dependent modules.
Remove the --local command line option and instead
automatically detect if the gpodder script is called
from a source folder (determined by the existence of
"src" and "data" in the parent folder and by the fact
that prefix does not start with '/usr').
Clean up setup.py and use metadata from the module.
When syncing to iPod if an epsode has been partially played making
the unplayed blue dot disappear, then the status is now maintained
by not marking as unplayed if the bookmark_time > 0.
When syncing to ipod, played episodes are marked as
played in gPodder and optionally deleted from new option
ipod_delete_played_from_db.
Checkbox added for this new option.
The episodes that are queued to sync are now ordered
by the pubDate attribute, so that MP3 Players (like
the Sansa Fuze) sort podcasts in the correct order.
Some podcasts such as NPR's Science Friday podcast do
break up a single episode in several parts, which has
led to parts playing in reverse order.
Thanks to Abraham D Smith for the bug report and an
initial patch to solve this issue.
According to Sebastian Krause:
The method 'itdb_cp_track_to_ipod' doesn't seem to be able to deal with
Unicode and strings in simply converting it to a Python string seems to solve
the problem. I don't know if that's also the reason for Wilfred's error (his
traceback is different), but applying the string conversion to the git
repository might already help a lot of people.
This patch converts Unicode strings to C strings before the call.
If we call local_filename(create=False) in the sync
module, by definition we must not get the None value
back (because we only "transfer" files that have been
downloaded). If we get caught returning None in this
case, we know there is something wrong.
Move the conversion code from the iPodDevice class to the Device class then
add self.convert_track() to MTP and FS add_track functions. Also, add
option to disable pre-sync conversion for FS-based players.
Note: This has not been tested with MTP devices, ymmv.
Thanks to Perter64 for pointing out this bug.
Advanced configuration option to not call the "sync"
system utility to flush caches to disk.
We usually do this, so that basic users may unplug
their devices right after gPodder shows "sync done".
For advanced users who know to correctly unmount their
devices, this is annoying, so let them disable it.
Thanks to Christian Mertes for requesting this feature.
This is an improvement upon the original rockbox cover
art sync, as it allows to set the file type and file name
of the cover file that will be put on the MP3 player.
With this feature, cover art is displayed on the Sansa Fuze
and other MP3 players that support showing the cover art
if there is an image file in the same folder.
Add a Dependency Manager window and class to handle optional
dependencies and make it possible to register special features
with their description and optional dependencies.
Support the gtkhtml2 module in the episode description
dialog to display HTML markup for the episode description
and allow links and HTML lists, etc.. in the dialog.
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)"
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.
I have encountered another piece of code, which hangs the
sync process due to incompatibility with my legacy non-UTF8
locale. So I've added one more function to gpodder.util
which just cleans strings from possible further errors.
Fix random segfaults when syncing
Closes bug #150 (http://bugs.gpodder.org/show_bug.cgi?id=150)
* src/gpodder/gui.py: Don't make any gui calls from the sync thread
* src/gpodder/sync.py: add a post-done signal to trigger the finished
sync callback
* src/gpodder/trayicon.py: instantiate __sync_progress during
GPodderStatusIcon __init__ or else you'll get a traceback when
transfering single episodes
git-svn-id: svn://svn.berlios.de/gpodder/trunk@781 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Merge patch to fix bug #147 (Sync doesn't work)
* src/gpodder/gui.py: Use Device.episode_on_device(episode) to retrive
device_episode and simplify logic to determine whether an episode is on
the device and eligible for removal
* src/gpodder/sync.py: Add Device.episode_on_device(episode)
git-svn-id: svn://svn.berlios.de/gpodder/trunk@765 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Merge check free space before syncing patch
* src/gpodder/gui.py: Display a dialog box informing the user in the
event that there is insufficient free space on their device before
syncing begins.
* src/gpodder/sync.py: Added Device.tracks_list which is populated by
Device.get_all_tracks() when Device.open() is called.
Added Device.episode_on_device(episode)
Added Device.get_free_space()
git-svn-id: svn://svn.berlios.de/gpodder/trunk@760 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Display message if user tries to sync to iPod without gpod installed
* src/gpodder/gui.py: Add an informative self.notification() if the user
attempts to sync an iPod without the libgpod python bindings installed
* src/gpodder/sync.py: Add sync.gpod_available, Add Device.errors to
prevent a crash in the event of an error
git-svn-id: svn://svn.berlios.de/gpodder/trunk@754 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Merge patch from Justin Forest and Thomas Perl:
- Use SQLite instead of cPickle to store all data, including feed summary
and entries, download and play history.
- Migration assistant to import the old cPickle files in to the SQLite DB
* src/gpodder/cache.py: SQLite-related accomodations
* src/gpodder/console.py: SQLite-related accomodations
* src/gpodder/dbsqlite.py: New file, SQLite interface for gPodder
* src/gpodder/gui.py: Lots of changes to accomodate the new SQLite
DB + new migration assistant code
* src/gpodder/libgpodder.py: Added gPodderLib.migrate_to_sqlite().
HistoryStore and ChannelSettings are marked as DEPRECATED
* src/gpodder/libpodcasts.py: SQLite-related accomodations and new
code for setting/determining episode state
* src/gpodder/sync.py: SQLite-related accomodations
* src/gpodder/trayicon.py: Use episode.was_downloaded() instead
of episode.is_downloaded()
* src/gpodder/util.py: SQLite-related accomodations
git-svn-id: svn://svn.berlios.de/gpodder/trunk@750 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Improve performance related to pubDate parsing; Download button; update feeds
* src/gpodder/gui.py: Notify user when we are building the list of
channels instead of staying at "updating [last feed]".; Make the "OK"
button of the gPodderEpisodeSelector a "Downlaod" button, because
that's what the button does when clicking it - downloading episodes
* src/gpodder/libpodcasts.py: pubDate is now an Unix timestamp
everywhere and not a string, which has to be parsed quite often; Fix
up and improve the creation of the channel list model
* src/gpodder/sync.py: Customizations for the new pubDate code
* src/gpodder/util.py: Remove updated_parsed_to_rfc2822, because we
don't need it anymore with the new pubDate code
git-svn-id: svn://svn.berlios.de/gpodder/trunk@740 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Merge patch to add experimental support for "normal" file naming
* src/gpodder/config.py: New option "experimental_file_naming" that
defaults to False and enables the new (but experimental!) normal file
naming mode in which the downloaded podcast episodes get their name
not from the md5sum of the download URL, but from the basename of the
download URL, which makes filenames more human-readable
* src/gpodder/libpodcasts.py: Change local_filename() in podcastItem
to decide if we use md5sums or the "new" file naming mode for creating
the local file name of an episode
* src/gpodder/sync.py: Change usage of the "encoding" detection in
gpodder.util (from detect_os_encoding() to simply encoding)
* src/gpodder/util.py: Only detect the filename encoding once (at
program start) and then make it accessible via a global "encoding"
variable in the gpodder.util module; add improvements to
file_extension_from_url() to be able to return the complete filename
and to support more creative URL schemes as implemented by podcast
feed authors (this hopefully makes more feeds work in a proper way)
(Closes: http://bugs.gpodder.org/show_bug.cgi?id=57)
Add line to the previous ChangeLog entry (which I forgot initially):
(Closes: http://bugs.gpodder.org/show_bug.cgi?id=124)
git-svn-id: svn://svn.berlios.de/gpodder/trunk@736 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Merge patch from Nick to add support for deleting played files on sync
* data/gpodder.glade: Add check button for "Delete episodes on device
that have been marked played in gPodder"
* src/gpodder/config.py: Add two new config options:
"mp3_player_delete_played" and "mp3_player_max_filename_length"
* src/gpodder/gui.py:
* src/gpodder/libpodcasts.py: Add "is_deleted()" convenience function
for a podcast episode
* src/gpodder/sync.py: Clean-up and simplify parts of the code to make
it better-structured and avoid code duplication; use the configuration
variable for the MAX_FILENAME_LENGTH instead of hard-coding it to 100
* src/gpodder/util.py: Split sanitize_filename() into two functions,
detect_os_encoding() and sanitize_filename() for better code re-use
(Closes: http://bugs.gpodder.org/show_bug.cgi?id=56; code written by
Nick (nikosapi) and initial idea by Shane Donohoe, see the bug page)
git-svn-id: svn://svn.berlios.de/gpodder/trunk@734 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Merge Support for Rockbox Cover Art patch (by David Spreen and Nick)
* src/gpodder/config.py: Add configuration options for rockbox cover
art, thanks to Nick for providing the patch and integration
* src/gpodder/gui.py: Add David Spreen to the list of contributors
* src/gpodder/sync.py: Merge patch from David Spreen and Nick to
support Rockbox cover art synchronization
git-svn-id: svn://svn.berlios.de/gpodder/trunk@729 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Logging traceback is enabled by default (needs to be disabled on demand)
* src/gpodder/*.py: Remove "traceback=True" from logging calls
* src/gpodder/liblogger.py: Always print a traceback if it's
available; if not, do not print it out; this can be disabled by
passing "traceback=False" to the log() function
* src/gpodder/sync.py: Also add "traceback=False" for optional imports
git-svn-id: svn://svn.berlios.de/gpodder/trunk@682 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Additional fields for the device remove episodes dialog; refactoring
* src/gpodder/gui.py: Add "Podcast" and "Released" columns to the
episode selector; hide all columns in our "delete from device" episode
selector that have all rows set to "None"; make the first text column
of the gPodderEpisodeSelector bigger, so the episode selector is
easier to read when there are many columns
* src/gpodder/libpodcasts.py: Use util.format_date() for
cute_pubdate() in podcastItem
* src/gpodder/sync.py: Document SyncTrack a bit better, add
needed/possible keyword arguments that are used in the UI; default
some values to None in case they are not provided; get "released" date
from iPod's iTunesDB and get podcast name from MP3 player's sync
folder (if this feature has been activated)
* src/gpodder/util.py: Add format_date() function that converts a Unix
timestamp to a good representation for a date (either Today,
Yesterday, a weekday or the locale's appropriate representation); the
code has been re-factored from podcastItem's cute_pubdate() function
in gpodder.libpodcasts and is now used from there
git-svn-id: svn://svn.berlios.de/gpodder/trunk@677 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Merge patch from Jerome Chabod to fix Remove podcasts for MP3 players
* src/gpodder/gui.py: Add warning message when we can't find a needed
attribute; add "Philippe Gouaillier" to list of contributors (bug
reporter for this bug)
* src/gpodder/sync.py: Add playcount attribute to MP3 player sync code
(Closes: http://bugs.gpodder.org/show_bug.cgi?id=96)
git-svn-id: svn://svn.berlios.de/gpodder/trunk@667 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Increase filename size limitation from 50 to 100 chars in MP3 player sync
* src/gpodder/sync.py: Increase the number at which file names are cut
down in length to 100 characters and also cut folder names to that
length; thanks to Bernd Schlapsi for reporting this bug on the list
git-svn-id: svn://svn.berlios.de/gpodder/trunk@650 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Project management updates (authors, contributors and copyright)
* AUTHORS: Removed (was outdated); content now in gui.py (AboutDialog)
* bin/gpodder, data/po/Makefile, doc/dev/copyright_notice,
doc/dev/win32/setup-win32.py, INSTALL, Makefile, README,
setup.py: Updated Copyright and old website URL to include 2008, the
gPodder team and www.gpodder.org
* src/gpodder/*.py: Updated Copyright years
* src/gpodder/gui.py: Add list of contributors from AUTHORS file and
from the content on the website's news page (please mail me if I
forgot to mention you as a contributor, I surely have missed a few);
make the AboutDialog's application name "gPodder" (from gpodder) and
add an URL hook function to the AboutDialog, so the website is opened
in the user's default web browser
git-svn-id: svn://svn.berlios.de/gpodder/trunk@648 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Add support for Rockbox' AudioScrobbler logfile to update played status
* src/gpodder/config.py: Add "mp3_player_use_scrobbler_log"
configuration option (defaulting to False) which controls if we are
going to try and find a ".scrobbler.log" file that contains
information on which tracks have been played; for this to work, you
also have to enable the "Updated tags after download" option
* src/gpodder/sync.py: Support for finding the .scrobbler.log file and
updating the played status of episodes in the MP3 player sync code
* src/gpodder/util.py: Add "find_mount_point()" function that tries to
determine the mount point on which the given directory (or file) lies
and returns the mount point or "/" if the directory/file resides on
the root filesystem.
This whole patch has been contributed by Nick <nikosapi.org> - thanks!
git-svn-id: svn://svn.berlios.de/gpodder/trunk@646 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This is trunk, so set version to 0.11.1+svn
* bin/gpodder: Set version to 0.11.1+svn
Thu, 27 Mar 2008 12:57:56 +0100 <thp@perli.net>
gPodder 0.11.1 "Attacked by Killer Tomatoes" released
* bin/gpodder: gPodder 0.11.1 released :)
* README: gPodder 0.11.1 released :)
* doc/man/gpodder.1: gPodder 0.11.1 released :)
* data/icons/24/gpodder.png: Updated from the dataset
* data/messages.pot: Updated from source
* data/po/*.po: Updated from messages.pot
* data/po/de.po: Updated German translation
git-svn-id: svn://svn.berlios.de/gpodder/trunk@641 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Fix "Podcasts not being marked as new when synced to iPod" (#70)
* src/gpodder/sync.py: Fix bug when podcasts were not marked as new
when synced to iPod and "on_sync_mark_played" was enabled;
Bug URL: http://bugs.gpodder.org/show_bug.cgi?id=70
Thanks to defrex (defrex0 gmail com) for report this bug in Bugzilla
git-svn-id: svn://svn.berlios.de/gpodder/trunk@628 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Patch from Nikosapi to fix MP3 player sync progress
* src/gpodder/sync.py: Patch from Nick (nikosapi.org) to fix MP3
player sync problems: "Instead of displaying the proper percentage of
the copied file in the FS-based sync dialog, gPodder would initially
report 100% and near the end of the copy it would report percentages
>100%."
git-svn-id: svn://svn.berlios.de/gpodder/trunk@614 b0d088ad-0a06-0410-aad2-9ed5178a7e87
Add option to write gtkpod extended database on sync
* data/gpodder.glade: Add a check box for the new config option
* src/gpodder/config.py: Add ipod_write_gtkpod_extended boolean
configuration variable that controls if we want to write iTunesDB.ext
after synchronization (defaults to False)
* src/gpodder/gui.py: Glue code for UI<->Config manager
* src/gpodder/sync.py: Use libgpod's "gtkpod" module to write the
extended gtkpod database (iTunesDB.ext) to the iPod after sync - this
has to be enabled via an option
git-svn-id: svn://svn.berlios.de/gpodder/trunk@608 b0d088ad-0a06-0410-aad2-9ed5178a7e87