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.
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.
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.
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.
* #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)
- 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