Commit graph

5071 commits

Author SHA1 Message Date
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
Teemu Ikonen 80cec0d024 setup.cfg: Add section for flake8 config
Set project-wide max-line-length and ignore indentation errors E126 and
E128, and warning W503 (Line break occurred before a binary operator)
for now.
2022-11-14 18:11:23 +02:00
auouymous 1b9ed37064
Merge pull request #1382 from tpikonen/ytdl-rename
Fix yt-dlp output file name
2022-11-14 04:08:49 +00:00
auouymous 9bdc9d966e
Merge pull request #1303 from auouymous/setting-to-disable-find-as-you-type
Add setting to disable find-as-you-type.
2022-11-09 03:42:05 +00:00
auouymous 98208d4444
Merge pull request #1374 from tpikonen/channel-buttons
channel editor: Add buttons next to cover, feed URL, etc.
2022-11-08 04:46:23 +00:00
Teemu Ikonen 44befb77f1 Add can_preview to play_or_download() output
Use it to decide if 'Preview' is shown in episode contect menu.
2022-11-07 15:28:54 +02:00
Teemu Ikonen 9690b13a3a Get preview file name from CustomDownload.partial_filename
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().
2022-11-07 15:28:54 +02:00
Teemu Ikonen 642bf7e738 youtube-dl: Add 'partial_filename' to YoutubeCustomDownload
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.
2022-11-07 15:28:54 +02:00
Teemu Ikonen 7b051d245b Add 'partial_filename' property to DefaultDownload
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.
2022-11-07 15:28:54 +02:00
Teemu Ikonen abc6370729 youtube-dl: Fix output file renaming
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.
2022-11-07 15:21:22 +02:00
auouymous ccb23494a1
Merge pull request #1429 from auouymous/queue-gpo-episodes-to-allow-resuming
Queue all episodes before download to allow resuming in gpo.
2022-11-04 06:32:47 +00:00
auouymous 1594d64813 Queue all episodes before download to allow resuming. 2022-10-27 16:31:16 -06:00
auouymous 89b4b6e796
Merge pull request #1372 from tpikonen/resume-infobar
Replace SimpleMessageArea with GtkInfoBar when resuming
2022-10-27 07:24:01 +00:00
Teemu Ikonen 9130f39e8c Do not hide Progress tab resume infobar on page switch 2022-10-24 11:41:58 +03:00
Teemu Ikonen 70c97522e6 Replace SimpleMessageArea with GtkInfoBar when resuming
Remove unused SimpleMessageArea code.
2022-10-24 11:41:51 +03:00
Eric Le Lay 30f087fae7
Merge pull request #1420 from neodyne/sk-translation-update-6
Update Slovak translation (sk.po)
2022-10-13 21:47:03 +02:00
Eric Le Lay e31591bcc1
Merge pull request #1421 from rene-coty/master
Updated French translation
2022-10-13 21:39:30 +02:00
rene-coty 41ac91ba3f
Correction 2022-10-12 00:18:04 +02:00
rene-coty 220cf8cf05 Updated French translation 2022-10-11 18:00:41 +02:00
neodyne 23e60bed57 Update Slovak translation (sk.po) 2022-10-10 17:02:49 +02:00
Eric Le Lay c41ca22e5d
Merge pull request #1404 from auouymous/use-symbolic-toolbar-icons
Use symbolic toolbar icons.
2022-10-09 12:18:17 +02:00
auouymous fbcc72a906 Disable progress spinbuttons if unchecked at startup.
They correctly enable/disable when the checkbox is clicked, but have
always defaulted to enabled at startup, even when the checkbox is
unchecked.
2022-10-01 05:39:40 -06:00
auouymous 7b07602374
Merge pull request #1412 from huftis/update-nn-translation-2022-sep
Update Norwegian Nynorsk translation for next release
2022-09-30 06:47:06 +00:00
auouymous 557229c08c Update progress widgets when their values are modified via edit config. 2022-09-29 21:20:42 -06:00
auouymous 9a4d5e34cd Add method to clamp a config value between minimum and maximum values. 2022-09-29 21:19:01 -06:00
Karl Ove Hufthammer 3f234a6ffe Update Norwegian Nynorsk translation for next release 2022-09-28 20:54:09 +02:00
auouymous 1dbc8288d1
Merge pull request #1409 from Vistaus/master
Updated Dutch translation
2022-09-27 04:43:37 +00:00
Heimen Stoffels b4d97ebf26
Updated Dutch translation 2022-09-26 18:20:39 +02:00
auouymous 6d3171ecb7 make messages 2022-09-25 20:27:20 -06:00
auouymous 9cadc2735a
Merge pull request #1304 from tpikonen/gpo-description-link
gpo: Add Description and Link fields to info
2022-09-26 02:19:25 +00:00
auouymous a75a2e411b
Merge pull request #1398 from auouymous/fix-format-time
Fix the format_time() function to display times greater than 24 hours.
2022-09-26 01:20:22 +00:00
Eric Le Lay 5825f51183
Merge pull request #1401 from auouymous/catch-sync-device-open-exceptions
Catch unknown sync exceptions when opening device and show error.
2022-09-24 19:20:52 +02:00
Eric Le Lay 1ecdbed0df
Merge pull request #1400 from auouymous/log-unwritable-sync-messages
Write to log when sync directory is not writable.
2022-09-24 19:19:43 +02:00
Eric Le Lay cb59e1e051
Merge pull request #1402 from auouymous/open-logs-folder
Add menu item to open logs folder.
2022-09-24 19:17:27 +02:00
auouymous 26ca4e7649 Use symbolic toolbar icons.
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.
2022-09-23 03:40:07 -06:00
auouymous 08ec67d297
Merge pull request #1403 from bahorn/fix/drag-and-drop-urlquote
Quoting file URIs moved by drag and drop
2022-09-23 09:08:14 +00:00
B Horn 4e5168d1ba
Quoting file URIs moved by drag and drop
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>
2022-09-21 14:18:29 +02:00
auouymous b907183b22 Add menu item to open logs folder. 2022-09-19 23:37:31 -06:00
auouymous 37ad7cac89 Catch unknown sync exceptions when opening device and show error.
Some devices lack writable info and gpodder assumes they are writable.
This can lead to an exception being thrown when not writable.
2022-09-19 22:51:53 -06: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
auouymous 83b0aa1c87
Merge pull request #1383 from tpikonen/ytdl-no-audio-video-files2
Don't try to download media files with youtube-dl extension
2022-09-20 02:29:42 +00:00
auouymous 04a0116a31 Close progress dialog immediately in concatenate videos extension. 2022-09-19 18:57:29 -06:00
auouymous 80629f91d7 Fix msgstr errors in Norwegian Bokmål translation.
Fixes #1399.
2022-09-19 18:47:58 -06:00
auouymous 83d99af8ab Make releasetest failures actually generate errors. 2022-09-19 18:47:52 -06:00
auouymous 2659333380 Fix the format_time() function to display times greater than 24 hours.
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.
2022-09-17 19:29:24 -06:00
auouymous b8bbcfa088 Don't use idle_add() for progress dialogs that don't need it.
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.
2022-09-17 00:46:57 -06:00
auouymous fe83a92286 Remove redundant timeout removal when creating progress dialog.
It is somehow possible for source_id to be zero, causing a
g_source_remove assertion warning.
2022-09-16 05:28:14 -06:00
auouymous 5c01b6b036 Fix crash on older versions of python.
Older versions of python do not treat None as False. This causes
set_sensitive() to crash when None is returned from can_pause().

Fixes #1394.
2022-09-12 14:16:31 -06:00
auouymous eb2ceba7a9 Remove download directory when unsubscribing in gpo. 2022-09-08 16:57:19 -06:00