Commit Graph

164 Commits

Author SHA1 Message Date
luzpaz 8a995cb097 Fix various typos
Found via `codespell -q 3 -S *.po -L bloc,extracter,parms`
2023-07-14 12:13:50 +00:00
auouymous 14efcd52df Log 'from' and 'to' sizes when syncing files. 2023-03-26 04:36:09 -06:00
auouymous 3d690633ee Add empty custom_downloader field in SyncTask to prevent exception.
filename generated by yt-dlp.

Reported in
https://github.com/gpodder/gpodder/issues/1348#issuecomment-1445273299
2023-03-05 22:33:39 -07:00
auouymous d64c06fa92
Merge pull request #1434 from auouymous/resync-on-file-size-change
Check for size mismatch when syncing and send to device again.
2022-11-18 10:50:25 +00:00
Teemu Ikonen d87ac85506 Fix 'W504 line break after binary operator' flake8 warnings
Fixed by running

autopep8 -i -r --select=W504 .

and some hand tuning.
2022-11-14 18:32:09 +02:00
Teemu Ikonen 6bd0bb0530 Remove unused imports and pass statements
Fixes flake8 error F401.
Most errors were fixed by running

autoflake -i -r --remove-all-unused-imports .

which also removes unnecessary 'pass' statements, some by hand-editing.
2022-11-14 18:32:09 +02:00
auouymous 5c277639de Check for size mismatch when syncing and send to device again.
An interrupted sync results in a partial file on the device and syncing
again would not finish sending the file. Ideally it could also compare
checksums but that would slow down syncing.

Fixes #1416.
2022-11-08 01:05:05 -07:00
auouymous e59a25e233 Write to log when sync directory is not writable.
The error message told user to check logs but nothing had been written.
2022-09-19 22:10:31 -06:00
Teemu Ikonen 8ebf566993 sync.py: Don't print traceback on missing libgpod_ctypes and eyed3.mp3 2022-07-12 18:29:31 +03:00
auouymous 0fe74c18d2 Generate HTML episode description only when needed.
PR #1094 generated an HTML description for any episode that lacked one.
That however increased the database size (almost double in worst case)
because it was storing both text and html versions of each description.
This fixes that by storing the episode thumbnail URL in the database and
generating the HTML description only when shownotes are drawn.

The text description is now cleared for episodes with an HTML
description. This further reduces database size for feeds that provide
both. It also fixes an issue for feeds that provide different text and
HTML descriptions, because the short description would show the text
description and shownotes would show the HTML description. And EQL only
searched the text descriptions, which might not match what the user sees
in the shownotes.
2022-06-19 11:56:12 -06:00
Thomas Perl a9726153c7
iPod support restored using ctypes and libgpod (#1289)
* iPod support restored using ctypes and libgpod
2022-06-02 17:41:42 -07:00
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