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.
Add 'custom_downloader' member var to DownloadTask. Use it in
episode.get_playback_url() to get a preview file name.
Also add episode.can_preview() method and use it in ep.can_play().
Add the 'partial_filename' property for a previewable temporary file.
Get this filename from yt-dlp / youtube-dl by splitting the download
into two parts, first get the extractor info which contains the 'ext',
derive the temporary filename from that and the outtmpl and then
download the file.
Derive abstract classes CustomDownload and CustomDownloader from ABC
from the abc module. Decorate abstract methods with @abstractmethod.
Add abstract 'partial_filename' property to CustomDownload and make it
concrete in the derived DefaultDownload class. This property holds the
full path of the temporary file where the episode is being downloaded
or None, if the downloader does not use a previewable temporary file.
Use separate code paths to rename output files from yt-dlp and
youtube-dl to the requested name ('tempname'). The output is always
renamed with yt-dlp.
Add the 'ext' to the output template. This is needed to unbreak
post-processing (like subtitle embedding). See yt-dlp issue #1844.
Use basename(tempname) for yt-dlp and tempname for youtube-dl as output
template, since we set the output path for yt-dlp in the 'paths' option.
The preferences-desktop icon is not available for 64x64 and larger icon
sizes, and gtk displays a missing icon instead of falling back to
smaller icons. Switching to preferences-other-symbolic would fix the
issue, but the other toolbar icons should probably be changed to
symbolic to match.
When dragging and dropping a podcast into another program, e.g VLC, some
filenames would cause issues (i.e ones with `#`).
Signed-off-by: B Horn <b@horn.uk>
Using datetime converts the seconds value into date and time components.
A value of 86400 generates a 00:00 time on the 2nd of January 1970.
The new code properly increments the hour field to 24 and beyond instead
of wrapping around to zero.
The dialog is created inside the function and can be destroyed there as
well. This prevents the idle_add from being blocked forever by a
timeout_add, and the dialog never closing.
Fixes#1311.