Commit Graph

153 Commits

Author SHA1 Message Date
auouymous 41c312dd68 Change deprecated logger.warn() to logger.warning(). 2022-04-29 02:54:32 -06:00
auouymous 182abc575b Refactor play_or_download() progress tab action code.
Fixes an issue with the toolbar cancel button turning off and on when
entering the progress tab, even though it can't cancel anything until a
selection is made.

Properly cancels failed tasks manually removed from progress tab. Not
cancelling would leave the error icon and prevent downloading or
cancelling.

The download, pause and cancel actions in toolbar and Episodes
menu can now be used to control downloads in the progress tab. The
delete menu item in Episodes menu removes the download from list. This
also allows keyboard accelerators to be used, such as the Delete key
for removing tasks. Accelerators for cancel, and maybe download/pause,
should added in a future PR.

The progress tab context menu now has the same ordering as the other
menus.
2022-03-23 18:53:38 -06:00
auouymous f6bae4f780 Remove invalid parameter passed to Device.cancel().
Fixes https://github.com/gpodder/gpodder/issues/1212#issuecomment-1069661280
2022-03-16 17:03:03 -06:00
auouymous 3ff7ed37a5 Show 'Syncing' in progress tab instead of 'Downloading' when syncing. 2022-01-25 00:58:27 -07:00
Eric Le Lay 8873604e2d fix #1212 Error when running from CLI
the Gtk import was there by mistake
2022-01-24 21:16:32 +01:00
Marcel Ackermann 2f42c11e59
remove unused import
closes https://github.com/gpodder/gpodder/issues/1187
2021-10-30 11:13:00 +02:00
Mark Weaver ed5d18e1b0 fixes #1152 and an odd corner case (#1155)
* #1152: fix re-ordering downloads list

* fix downloading a task that's already been removed from the download list

* fix download/delete/download of the same episode

* fix pausing/cancelling sync tasks; clean up partially synchronised files

* fix cancelling a failed download

* make failed/paused/cancelled mutually exclusive so the code has less paths (and hopefully is easier to follow)
2021-09-14 00:53:15 -07:00
blushingpenguin 20b0ed3aae #1117, #1137: fix another lint issue 2021-08-31 14:43:55 +01:00
blushingpenguin 8760b6d315 #1117, #1137: fix re-introduced race queuing tasks 2021-08-31 14:37:36 +01:00
blushingpenguin 68195acc00 #1117, #1137: fixes for pause/resume/cancelling download tasks 2021-08-30 15:45:20 +01:00
blushingpenguin 56291c0f6f #1111: fix download limit not being respected, add new tasks in the queued state so they render correctly in the ui 2021-07-31 08:23:23 +01:00
auouymous 776b9b850e Fix additional linting issues. 2021-07-29 18:10:26 -06:00
auouymous 106e2f4fcd Fix linting issues from #1054 2021-07-27 21:44:04 -06:00
blushingpenguin e09f5aecad fix playlist sync 2021-07-11 19:52:34 +01:00
blushingpenguin b6d5836827 remove old, disabled mtp support 2021-06-12 16:27:30 +01:00
blushingpenguin e2a512a34c add mount call for CLI; fix done_callback not being called if opening device fails; handle errors from querying device 2021-06-12 15:45:53 +01:00
blushingpenguin e93dcddb56 windows fixes 2021-06-08 20:55:56 +01:00
blushingpenguin 729dbee534 more threading fixes: fix race cleaning up folders by ignoring failure to remove a folder (two threads could try to do this at the same time); log file copy errors (these seem to get lost by the ui) 2021-06-05 08:07:27 +01:00
blushingpenguin e7fab75c17 fix sync errors if multiple threads try and create the same folder, fix spawning 1 thread per sync task 2021-06-04 07:56:34 +01:00
blushingpenguin c1081c6678 gpo fixes: prevent warning about not setting Gst/Gio versions, not actually mounting volumes always succeeds 2021-05-31 13:21:06 +01:00
blushingpenguin 6d40da3cb5 use Gio for file system based device sync (allows mtp:// urls) 2021-05-31 07:12:13 +01:00
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