Commit Graph

164 Commits

Author SHA1 Message Date
Thomas Perl dd9ca2a386 Remove util.sanitize_encoding() 2016-11-21 23:40:05 +01:00
Thomas Perl 5a7c30b359 Port to Python 3 2016-11-21 23:13:46 +01:00
Adam Voss 27dbe80782 Allow reordering of the download queue 2016-11-15 12:00:57 -06:00
Thomas Perl 9b8dbdc3a6 New try to do a minimal Gtk+3 port 2016-09-25 14:31:58 +02:00
Thomas Perl 36eefc8a30 Update copyright years (2016) 2016-01-15 15:22:52 +01:00
Thomas Perl 169102de09 Device sync: Only fail if we can determine free disk space (bug 2052) 2015-12-16 09:33:21 +01:00
Aaron Wright ce6ddb6db0 Updated to handle sync failure when no space left
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.
2015-05-27 12:09:04 -04:00
Thomas Perl aa72634950 Update copyright years (2015) 2015-05-24 19:33:39 +02:00
Alex Mayer 432bf5ba5f Extensions: Add on_episode_synced Extension Call
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
2014-04-10 10:45:49 -04:00
Alex Mayer c74697a5d3 sync: create functions to get folder and file names on 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
2014-04-02 23:05:57 -04:00
Thomas Perl 553e35f219 Update copyright years (2014) 2014-02-27 21:55:13 +01:00
Thomas Perl b325c7db18 sync: Require eyed3 version 0.7 (Fixes #100)
eyed3 has updated their API with version 0.7. Use the
new API. The old API version of eyeD3 is not supported.
2014-01-29 21:27:22 +01:00
Joseph Wickremasinghe 8073a87a46 iPod sync alpha release 2013-10-09 21:24:02 -07:00
Eugene Nikolsky 7dc92bfde9 Gtk UI: Fix device sync progress not updating (bug 1832)
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.
2013-06-14 23:59:27 +03:00
Thomas Perl bda982be02 Update copyright years for 2013 2013-03-05 16:38:48 +01:00
Joseph Wickremasinghe b7d23744e5 Device sync: Fix sync when playlists are disabled (bug 1769) 2013-02-20 21:31:26 +01:00
Bernd Schlapsi d5eae16b9f Improvements to the extension system
- 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
2012-12-07 10:30:28 +01:00
Thomas Perl 9e5fd7581a Merge pull request #15 from Mic92/master
- Sync filename fixes in src/gpodder/sync.py
- Use C locale when running unit tests
- Add documentation on how to run unittests
2012-08-16 00:03:27 -07:00
Jörg Thalheim e4f988d4b9 Fix syncing with utf8-incompatible file names
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.
2012-08-13 22:28:52 +02:00
Bernd Schlapsi f1d3bdeca9 correct wrong config variable in the sync module 2012-07-30 21:58:37 +02:00
Thomas Perl 972c045ad9 Merged and cleaned-up the device sync code (bug 1579) 2012-07-09 21:17:13 +02:00
Joseph Wickremasinghe 5b949efba2 Updates as per Thomas' comments Jul 3rd 2012 2012-07-09 20:25:37 +02:00
Joseph Wickremasinghe 2774142f8f Added device sync using 'Downloads' tab to show progress 2012-07-09 20:25:37 +02:00
Thomas Perl 8012c4f6bb Remove portable device synchronization 2010-12-20 10:29:41 +01:00
Thomas Perl bbd5720775 Ignore invalid timestamp from iPod (bug 418) 2010-12-18 13:59:31 +01:00
Justin Forest 7555f2f59e Fix logging code that breaks MTP sync (bug 1152) 2010-09-27 00:27:58 +02:00
Thomas Perl 88a307f2bc Ship the patched pymtp with gPodder (bug 307)
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.
2010-09-26 23:31:28 +02:00
Marco Villegas d9167c095e Add hooks for pre- and post-sync (bug 261) 2010-09-26 23:10:29 +02:00
Justin Forest 3d4ae77339 MTP: Configurable podcast folders (bug 1098)
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)
2010-08-23 23:07:01 +02:00
Thomas Perl 060ba862dd Device sync: Use defensive encoding (bug 1097)
Make sure that we always use the system default
encoding for file and folder names in order to
avoid encoding errors on certain systems.
2010-08-23 23:03:27 +02:00
Thomas Perl 2f0477de62 Clarify iPod sync dependencies (bug 1095) 2010-08-21 00:21:33 +02:00
John Rabotnik de50c4f065 Option to write gtkpod database for iPods (bug 571)
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.
2010-08-20 22:48:30 +02:00
sneakypete 017f98aa82 Delete file-less episodes from iPod (bug 1025)
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.
2010-07-05 14:49:26 +02:00
Thomas Perl 78e8b3b4d8 Fix Rockbox cover art copying (bug 1022) 2010-05-18 17:38:33 +02:00
Thomas Perl de70bddcd4 Fix two unassigned variable errors 2010-05-17 18:31:54 +02:00
Thomas Perl cf44f7c30e Code cleanup: Remove unused imports 2010-05-17 18:26:13 +02:00
Thomas Perl aa74b161e7 Refactor delete_episode_by_url -> delete_episode 2010-04-26 21:17:35 +02:00
Thomas Perl 1a95a28156 Better sorting of to-be-synced episodes 2010-04-26 20:04:09 +02:00
Thomas Perl 67693b0b96 Handle missing PyMTP library (bug 924)
Don't throw an exception if the PyMTP
libraries are not installed, but fail
gracefully (don't open the device, etc).
2010-03-14 21:50:25 +01:00
Thomas Perl 88e8438f90 Add file extension for MTP devices (bug 922)
This is the result of a regression for another
fix. We now re-add the file extension for the
episode so that it can be played on some devices.
2010-03-14 21:40:47 +01:00
Thomas Perl c35afab997 Add podcasts to master playlist of iPod (bug 915) 2010-03-14 21:36:14 +01:00
Justin Forest 143e84f8dc GStreamer-based episode length detection (bug 882) 2010-03-14 21:28:13 +01:00
Thomas Perl 0908c92857 Don't call "sync" on Windows (bug 775)
The Unix utility "sync" is not avaiable on
Windows, and therefore we must not call it.

Thanks to David Kuntz for the hint.
2010-03-07 18:07:01 +01:00
Jérôme Chabod 1c298a515d Fix file naming on mtp devices (bug 755) 2010-02-05 21:19:46 +01:00
Thomas Perl fb6210eb84 Fix strings with positional arguments
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.
2010-01-18 21:20:22 +01:00
Thomas Perl 2c84095f6f Don't deleted locked episodes on sync (bug 779)
When the configuration option to delete episodes
after sync is enabled, don't delete episodes that
are locked (and thus have deletion prevented).
2010-01-11 21:55:55 +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
Alex Bennee 5048672144 Clean up the parsing of .scrobbler.log (bug 631)
* 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.
2009-11-05 10:59:18 +01:00
Thomas Perl f09df62178 Fix cover file name in backup and sync (bug 591)
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.
2009-10-12 11:12:12 +02:00
Thomas Perl 83006b076b Refactor synchronization UI code in separate module
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!).
2009-09-05 14:28:02 +02:00
Thomas Perl c4664116bb Small encoding bugfix for CLI device synchronization 2009-08-24 17:11:02 +02:00
Thomas Perl c854935fc9 Refactor libpodcasts to be independent of gPodderLib
Again, this makes the code cleaner and allows for more
refactoring and a cleaner code path in the future.
2009-08-13 20:39:00 +02:00
Thomas Perl a67174a597 Remove dependency on libgpodder/gPodderLib for most modules
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.
2009-08-11 00:09:38 +02:00
Thomas Perl 5d4097ecb6 Refactoring: Database object usage / reference
Minimize the direct usage of the database object to
avoid dependencies between modules. Also clean up some
cruft in the GUI code.
2009-08-10 23:14:35 +02:00
Thomas Perl fb3be5238b Remove support for writing the gtkpod extended DB (bug 68)
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.
2009-07-13 14:24:07 +02:00
Bernd Schlapsi 16d0e68eb5 corrected an error happened in commit http://repo.or.cz/w/gpodder.git?a=commit;h=41b6e827cdedecc75a004af5d9646b9f84da1865 2009-07-12 17:22:37 +02:00
Thomas Perl 48c6ca8f10 Remove use_si_units and get length from HTTP header preferences
Two more configuration options are going away :)
2009-07-06 16:05:59 +02:00
Thomas Perl 41b6e827cd Remove libtagupdate + related functionality
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?).
2009-07-06 15:54:57 +02:00
Torbjörn Wassberg a050637fd5 Fix sort order in "Remove podcasts" dialog (bug 408)
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.
2009-05-26 13:56:49 +02:00
Thomas Perl 02ed5cac7b Add file extension to MTP-synchronized files (bug 463)
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.
2009-05-26 12:51:28 +02:00
Thomas Perl 872b6cb91c Filter tracks before synchronization (bug 446)
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.
2009-05-12 10:14:20 +02:00
Thomas Perl b1ec8f62e9 Make gPodder more library-like; remove --local
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.
2009-05-07 16:26:07 +02:00
Shane Huntley b06f6751e1 Part played episodes no longer marked new on iPod (bug 403)
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.
2009-05-05 09:30:06 +02:00
Shane Huntley 4572dbf29a Ipod sync behaviour changes
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.
2009-04-27 18:39:18 +02:00
Thomas Perl 302436f89e Sync episodes ordered by publishing date (bug 388)
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.
2009-04-27 15:54:15 +02:00
Bernd Schlapsi ac0552b294 Fix "mp3_player_delete_played" config option (bug 398)
Added a new field to the SyncTrack object. For my this patch
works, but I couldn't test it with a MTPDevice or an iPod.
2009-04-11 13:02:58 +02:00
Torbjörn Wassberg 8b246ef484 Display MP3 tags when removing episodes (sync module)
I have made a small patch to make the Remove episodes
dialog look for tag-tiles in MP3-devices.
2009-03-23 22:31:25 +01:00
Jérôme Chabod 7fbf04d54c Fix a regression in the MTP synchronization code
I'm sorry but mtp device synchronisation is broken with this
new version. Here is small patch to fix it.
2009-03-11 10:30:37 +01:00
Thomas Perl 7f06c3a74e Fix errors with itdb_cp_track_to_ipod (bug 353)
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.
2009-03-01 19:44:56 +01:00
Thomas Perl 8dc493effd Add assertions for local_filename() in sync module
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.
2009-02-18 21:59:17 +01:00
Thomas Perl 5e21ccc25c Fix a bug in the sync convert_track() function
Thanks to Jerome Chabod for bringing this to my attention.
2009-02-16 17:36:09 +01:00
nikosapi dbae44fedb Offer pre-sync conversion for MTP and FS-based players
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.
2009-02-14 13:48:45 +01:00
Bernd Schlapsi dee419d490 Add missing parameter to episode.local_filename() calls
This is needed to make the synchronization module not
crash when trying to retrieve the episode filename.
2009-02-14 13:17:17 +01:00
Thomas Perl c6f53ffa45 Add option to skip disk sync after transfer (bug 338)
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.
2009-02-09 17:50:24 +01:00
Thomas Perl 0f226211b5 Update copyright info from 2005-2008 to 2005-2009
As every year, we have to update the year info for
gPodder in all our files throughout the source tree.
2009-02-01 21:22:21 +01:00
Justin Forest b9844c0bac Optionally remove old episodes from iPod
If ipod_purge_old_episodes is turned on in advanced settings,
episodes which were played and don't have stars are removed
from iPod before sync.
2008-11-19 16:47:53 +01:00
daggpod 3fe7d98387 Support cover art synchronization for Sansa Fuze and others
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.
2008-10-23 12:52:17 +02:00
Thomas Perl 0a3caebf12 Dependency Manager for optional components
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.
2008-10-14 19:27:10 +02:00
Thomas Perl ea811e0343 Experimental support for gtkhtml2 for episode dialog (bug 162)
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.
2008-10-14 19:14:50 +02:00
Sebastian Krause 079fe886e7 Make automatic iPod episode deletion work (bug 168)
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)"
2008-09-28 09:27:43 +02:00
Thomas Perl 9d8b9baaaf Fail if gpod is not available in iPod sync (bug 179)
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.
2008-09-07 16:44:09 +02:00
Jérôme Chabod 15e694be30 Support for MTP device synchronization (bug 9)
Support devices that use the Media Transfer Protocol.

Adds "python-pymtp" as optional dependency if the user
wants MTP device synchronization.
2008-09-01 21:26:35 +02:00
Leonid Ponomarev f6d8406a3d Support legacy encodings better for synchronization
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.
2008-08-03 22:41:19 +02:00
Nick 212ffd3cd4 Sat, 19 Jul 2008 22:42:42 -0400 <me@nikosapi.org>
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
2008-07-20 02:55:30 +00:00
Nick a975d8240c Tue, 15 Jul 2008 15:15:42 -0400 <me@nikosapi.org>
Fix Device traceback when syncing (reported by: FriedBunny)

	* src/gpodder/sync.py: forgot to rename _track_on_device() in 
	Device.episode_on_device()



git-svn-id: svn://svn.berlios.de/gpodder/trunk@778 b0d088ad-0a06-0410-aad2-9ed5178a7e87
2008-07-15 19:19:43 +00:00
Nick d399120b89 Sun, 13 Jul 2008 15:19:39 -0400 <me@nikosapi.org>
Fix MP3PlayerDevice traceback when syncing (reported by: Wilfred van Rooijen)

	* src/gpodder/sync.py: make Device.__track_on_device() non-private



git-svn-id: svn://svn.berlios.de/gpodder/trunk@767 b0d088ad-0a06-0410-aad2-9ed5178a7e87
2008-07-13 19:23:12 +00:00
Nick 61d09e52e5 Fri, 11 Jul 2008 14:11:08 -0400 <me@nikosapi.org>
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
2008-07-11 18:17:48 +00:00
Nick faaac2ce63 Tue, 08 Jul 2008 21:25:24 -0400 <me@nikosapi.org>
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
2008-07-09 01:43:01 +00:00
Nick 9eb1ade8f5 Thu, 03 Jul 2008 20:09:18 -0400 <me@nikosapi.org>
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
2008-07-04 00:30:28 +00:00
Nick a86b127309 Sun, 29 Jun 2008 16:59:30 -0400 <me@nikosapi.org>
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
2008-06-30 01:10:18 +00:00
Thomas Perl 5b137db2cb Sat, 14 Jun 2008 18:50:29 +0200 <thp@perli.net>
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
2008-06-14 16:53:16 +00:00
Thomas Perl 0aec290ec2 Fri, 13 Jun 2008 16:08:16 +0200 <thp@perli.net>
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
2008-06-13 14:13:27 +00:00
Thomas Perl 905014fc1b Fri, 13 Jun 2008 09:37:45 +0200 <thp@perli.net>
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
2008-06-13 07:41:36 +00:00
Thomas Perl a87a5ba7d2 Thu, 05 Jun 2008 18:10:11 +0200 <thp@perli.net>
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
2008-06-05 16:11:25 +00:00
Thomas Perl d63f123e36 Revert traceback-related changes from r682
git-svn-id: svn://svn.berlios.de/gpodder/trunk@686 b0d088ad-0a06-0410-aad2-9ed5178a7e87
2008-04-22 20:24:19 +00:00
Thomas Perl bba4db9632 Tue, 22 Apr 2008 21:07:28 +0200 <thp@perli.net>
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
2008-04-22 19:08:54 +00:00
Thomas Perl 0abbea437c Sat, 19 Apr 2008 18:46:30 +0200 <thp@perli.net>
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
2008-04-19 17:01:09 +00:00
Thomas Perl 7fb4f324f5 Mon, 14 Apr 2008 13:40:32 +0200 <thp@perli.net>
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
2008-04-13 06:04:51 +00:00
Thomas Perl d840581b3a Fri, 04 Apr 2008 09:46:23 +0200 <thp@perli.net>
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
2008-04-04 07:47:40 +00:00