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
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.
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
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