Changed sync code to check needed pace against available space and raise
error if there is not enough room for the track. This causes the track
to be listed in the failed_sync list. I could not get it to be in the
failed_sync list without raising an exception. Added a new sync failed
exception.
Also changed the main gtkui code to not include the failed_sync tracks
in the list of tracks to perform post-sync processing on. This prevents
tracks that were not copied from being marked as played.
on_episode_synced pararms:
device: gpodder.sync.Device instance
episode: gpodder.model.PodcastEpisode instance
replace on_episode_downloaded with on_episode_synced in sync.py
This will allow users to make extensions that are triggered
after a file has been synced to a device
only effects MP3PlayerDevice
easy way to get folder and filename that episode will be
synced to on device
get_episode_folder_on_device(episode):
returns folder location on device episode will be
synced into
get_episode_file_on_device(episode):
returns filename that will be used on device
When the verbose mode is on, and the database is big, it can take
several seconds for gPodder to log all excluded from sync episodes. At
that time, the update downloads list timer stops, because there are no
sync tasks yet. This patch ensures the download list is updated after
all the sync tasks are added to the download queue.
- Add category metadata in every extension
- Show this category in the extension list gui
- Add "mandatory_in" and "disable-in" configuration for an extension
- Add Ubuntu unity check to enable/disable unity specific extensions
- Move "gpodder.win32" and "gpodder.osx" setting to the "gpodder.ui" namespace to be able to use it in the extensions category settings
- Only show metadata information in the right-click dialog of an extension
glob.glob tries to convert all filenames to unicode,
if it gets a unicode string as an argument.
To avoid decoding errors, it should just preserve the existing codec.
In order to avoid user confusion and because
pymtp disappeared from the upstream website, we
now ship pymtp with gPodder and only depend on
libmtp for MTP support.
I've recently switched from an iPod to a Sony Ericsson mobile phone,
which is accessible as an MTP device. It has support for podcasts, but
it only recognizes tracks as podcasts if they're in certain folders,
namely:
Music/podcast
Video/podcast
Picture/podcast
Tracks from these folders show up in the "Podcasts" menu, are
highlighted until played and per-file playback positions are remembered.
Attached is a patch which adds configurable folders for audio, video and
image podcasts. There is also a new option to create folders per podcast
(e.g., Music/podcast/No Agenda). The complete list of added config
options is:
mtp_audio_folder (str)
mtp_video_folder (str)
mtp_image_folder (str)
mtp_podcast_folders (bool)
On my iPod classic, sometimes when syncing with gpodder, some podcasts
would vanish. Opening the iPod in gtkpod and resaving the database
makes these missing podcasts reappear.
Episodes that are deleted from the device can still
have their associated entry in the iTunesDB. This
patch removes the entry from the database during a
synchronization operation.
Translatable format strings with more than one
positional argument should have their value
described by using a dictionary so that the
translators can reorder inserted variables.
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'
* Split on \t instead of using regex. Some fields are optional and the
regex got confused
* Store album/track instead of artist/track which gets more "hits"
This fixes up some of the problems I've been seeing however as the
scrobbling device is working from the id3/tag information on the track
in it's log we really should use tags for matching.
When adding new feeds, the new filename ".cover"
is not detected correctly when syncing files to
an iPod or backing up the download folder.
This patch fixes it by first trying the old name
("cover") and then the new one (".cover") if the
old one does not exist.
Thanks to Romain Janvier for reporting this bug.
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