Commit graph

132 commits

Author SHA1 Message Date
auouymous a955f7257a Move optional import errors to time of use to avoid spamming all users
with sync-only warnings. And better indicate why the modules are needed.
2020-05-13 01:30:48 -06:00
MarkusHackspacher 4baaa75ee4 fix E501 line too long
in lines with more than 145 characters
2018-09-07 06:52:32 +02:00
MarkusHackspacher 82f41f4c21 sorting imports
with isort -y -rc
see #393
2018-07-24 11:08:10 +02:00
Eric Le Lay 21acabebb5
Merge pull request #472 from MarkusHackspacher/style231
fix E231 missing whitespace after ','
2018-07-20 14:03:39 +02:00
Eric Le Lay 66bc2a6f72 fix #494 - ensure short filenames
- fix rename_download that was causing #494
- max_length is now mandatory in util.sanitize_filename
- add max_length param where it's missing
- factor name computation in deviceplaylist and sync
2018-07-20 09:38:00 +02:00
MarkusHackspacher c99fca923e fix E231 missing whitespace after ',' 2018-05-29 22:54:05 +02:00
MarkusHackspacher 7188ef9f2f fix E201 whitespace after '('
Part 2
2018-05-27 20:09:40 +02:00
MarkusHackspacher 0a851a1302 fix E265 block comment should start with '# ' 2018-05-16 18:17:52 +02:00
MarkusHackspacher 2075ea8d5f fix E225 missing whitespace around operator 2018-04-17 14:39:05 +02:00
MarkusHackspacher a1e7e1dcbe fix E226 missing whitespace around arithmetic operator 2018-03-27 21:40:36 +02:00
MarkusHackspacher a90fa0b521 fix W391 blank line at end of file 2018-02-11 21:51:40 +01:00
MarkusHackspacher 0c18a43d13 fix E302 and E303, only blank line change 2018-02-11 00:22:00 +01:00
Eric Le Lay 11569ca31d more pycodestyle checks
see #393 for discussion
2018-02-06 15:19:08 +01:00
MarkusHackspacher c1c841c08c Fix W293 blank line contains whitespace 2018-01-30 14:04:28 +01:00
Thomas Perl 98ec45a712 Update copyright years (2018) 2018-01-28 19:39:53 +01:00
Thomas Perl 7b46a0ee72 Update copyright years (2017) 2017-12-16 13:54:59 +01:00
Adam Voss 176a6205ae Changes to make Sync to work better 2017-04-22 10:45:38 -05:00
Adam Voss d2a9d58524 Changes since Python3 does floating point division
This was done based on a manual search for the '/' character.  No efforts were made to try to run all affected code paths.
2017-02-14 08:53:47 -06:00
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