Commit Graph

3319 Commits

Author SHA1 Message Date
Teemu Ikonen f533ed395a Replace SimpleMessageArea with GtkInfoBar when resuming
Remove unused SimpleMessageArea code.
2022-08-24 11:54:26 +03:00
Teemu Ikonen 4f360e62f6 Remove download actions from app.py 2022-08-24 11:54:26 +03:00
Teemu Ikonen d7f2943a70 main.py: Fix whitespace 2022-08-24 11:54:26 +03:00
Teemu Ikonen 10250404e8 Adapt in_downloads() to the adaptive version 2022-08-24 11:54:26 +03:00
Teemu Ikonen 9f168c5bda main.py: Detect if we're in downloads by func in_downloads() 2022-08-24 11:54:26 +03:00
Teemu Ikonen 13e25f1c48 Move actions needed in progress window from 'win' to 'app' 2022-08-24 11:54:26 +03:00
Teemu Ikonen d6b18463d3 main.py: Merge missing changes from master branch 2022-08-24 11:54:26 +03:00
Teemu Ikonen 224818e39f Remove context_popover_show() 2022-08-24 11:54:26 +03:00
Teemu Ikonen 596ee8ca61 Rename funcs on_treeview_podcasts_* to on_treeview_channels_* 2022-08-24 11:54:26 +03:00
Teemu Ikonen a420264400 Remove redundant treeview arg from treeview_*_show_context_menu funcs 2022-08-24 11:54:01 +03:00
auouymous 3a4cd026e9 Reset window position if completely off-screen. 2022-08-22 23:49:11 -06:00
Teemu Ikonen 2665bafe62 Disallow all treeview tooltips when context menu is open
Rename treeview_allow_tooltips() to allow_tooltips(). Remove the
treeview arg, and hard code it to enable or disable tooltips on channel
and episode treeviews.
2022-08-22 21:51:52 +03:00
Teemu Ikonen d1047bc739 Popup context menus with a LongPress gestures 2022-08-22 21:51:52 +03:00
Teemu Ikonen 142c0187d7 Replace downloads context GtkMenu with GtkPopover 2022-08-22 21:51:52 +03:00
Teemu Ikonen f69182308e Add actions for downloads context menu items 2022-08-22 21:51:51 +03:00
Teemu Ikonen 7cd9d3ee3a Remove funcs _add_sub_menu and _submenu_item_activate_hack 2022-08-22 21:51:51 +03:00
Teemu Ikonen 1cf9cf6436 Replace episode context GtkMenu with a GtkPopover 2022-08-22 21:51:33 +03:00
Teemu Ikonen b165447426 Add actions for episode context menu items
Disable 'bluetoothEpisodes' action when Bluetooth is not available.
Add episodeNew and episodeLock to set_episode_actions().
2022-08-22 19:20:28 +03:00
Teemu Ikonen f9ecbaddc6 Replace channel context GtkMenu with GtkPopover 2022-08-22 19:15:37 +03:00
Teemu Ikonen c90c8264d3 Add actions for channel context menu items 2022-08-22 19:10:53 +03:00
Teemu Ikonen 06cb0aa451 Add func TreeViewHelper.get_popup_rectangle 2022-08-22 18:56:58 +03:00
Teemu Ikonen dc7ebf494d Fix setting cover image from local file 2022-08-16 17:18:09 +03:00
Teemu Ikonen 93b636b6ca channel editor: Add buttons next to cover, feed URL, etc.
Remove the cover image context menu and add buttons next to various
items in the channel editor:

 * Cover image: Pop-up a menu to change or refresh the cover image
 * Feed URL: Copy the URL to clipboard
 * Download folder: Open the download folder
2022-08-16 17:18:09 +03:00
auouymous fc0c1981ed Add icon to clear URL in the add podcast dialog. 2022-08-13 02:51:15 -06:00
auouymous 932a8e7069 Fix stripping of pasted text when adding podcast URL. 2022-08-13 02:34:45 -06:00
auouymous 8fa11335be Add progress dialogs for long running actions.
Make the find partial downloads progress dialog update itself.

Show a progress dialog when queueing and resuming downloads.
2022-08-13 02:12:13 -06:00
auouymous 8d1acbd3ad Improve cancelling of progress dialog and manually updating it. 2022-08-13 02:09:24 -06:00
auouymous 165a45ac0d Add util.IdleTimeout class to reduce lag when updating progress tab. 2022-08-13 01:55:05 -06:00
auouymous bab023a4db
Merge pull request #1353 from auouymous/fix-hang-when-resuming-thousands-of-episodes
Fix hang when resuming thousands of episodes.
2022-08-13 00:06:28 -07:00
auouymous f20f1b3afd Fix hang when resuming thousands of episodes.
When the number of episodes causes update_downloads_list() to exceed 1.5
seconds, the idle_add callback will never be called and cause gpodder to
hang.

Fixes #1311.
2022-08-13 01:04:33 -06:00
auouymous f05ce1fc0a Switch deprecated GObject functions to GLib. 2022-08-13 00:33:28 -06:00
auouymous fdc2bb2eb9 Remove redundant force_start parameters. 2022-08-12 23:05:23 -06:00
Eric Le Lay a6e4d39fdd
Merge pull request #1355 from auouymous/keep-dialog-open-longer-before-resume-all
Keep 'find partial downloads' dialog open longer.
2022-08-04 23:43:01 +02:00
Thomas Perl 576ae2a762 Remove unneeded shebang lines 2022-08-04 12:39:05 +02:00
Thomas Perl 37e296c629 [shebang] Change /usr/bin/python -> /usr/bin/env python3
This should fix "unusual interpreter" Lintian warnings here:
https://udd.debian.org/lintian/?packages=gpodder
2022-08-04 11:53:08 +02:00
auouymous 97b3aab8de Keep 'find partial downloads' dialog open longer.
It can take a while to populate the list when there are a lot of
downloads to resume. This leaves the list empty and UI, including the
`Resume All` button unresponsive. Keeping the dialog open while Gtk
populates the list prevents this from happening.
2022-08-03 14:03:07 -06:00
Teemu Ikonen 27aed1fbea Merge tag '3.11.0' into dev-adaptive
gPodder 3.11.0 release
2022-08-01 22:04:06 +03:00
auouymous 75969b9111 prepare 3.11.0 release 2022-07-30 22:35:28 -06:00
auouymous 4c1cf5bcb0 Create 'Resume all' button by its clicked handler. 2022-07-18 15:18:36 -06:00
auouymous cf24177462
Merge pull request #1330 from auouymous/inject-extension-preferences
Add/remove extension preferences buttons when loaded/unloaded.
2022-07-13 11:50:32 -07: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 dc6ac8db12
Merge pull request #1334 from gpodder/thp/ctypes-python312
libgpod_ctypes: Use ctypes.c_time_t on Python 3.12
2022-07-12 01:23:07 -07:00
Thomas Perl a3a6bee1f4 libgpod_ctypes: Use ctypes.c_time_t on Python 3.12 2022-07-12 09:22:34 +02:00
Teemu Ikonen 4212b17bf2 Do not rely on the Extensions page being last in the stack. 2022-07-11 02:08:51 -06:00
auouymous aec5e162cf Add/remove extension preferences buttons when loaded/unloaded.
The user must currently close preferences and reopen to configure
extensions that provide a preferences UI. This is a problem when the
user does not know the extension has preferences, but the sudden
appearance of the button when an extension is enabled might catch the
user's attention.

Furthermore, removing the button when the extension is unloaded prevents
any confusion as to why it is still there.
2022-07-08 16:28:41 -06:00
Teemu Ikonen 6af0035caf util.open_website: Return True to block 'activate-link' default handler 2022-07-05 14:48:26 +03:00
auouymous e2f8c64f1a Change "YoutubeDL" and "Youtubedl" to "youtube-dl". 2022-07-04 14:51:45 -06:00
Teemu Ikonen 2cc1a7614a Merge branch 'master' into dev-adaptive 2022-07-02 23:31:38 +03:00
auouymous 78c2a2df91
Merge pull request #1309 from gpodder/revert-1284-undownload-checkbox
Revert "Fix #864 add undownload checkbox in delete episode confirm dialog"
2022-06-30 00:23:16 -07:00
auouymous 15fa2d4be9 Revert "Fix #864 add undownload checkbox in delete episode confirm dialog (#1284)"
This reverts commit 5eeda318f4.
2022-06-22 14:21:40 -07:00
auouymous 3c62528ec9 Wait for worker threads to finish before quitting.
Closing gpodder while tasks are downloading or pausing causes a hang and
must be killed from task manager or interrupted if launched from command
line. This was introduced in ed5d18e1b0
but only applicable when using python 3.10. The idle_add() callback is
no longer invoked to wake up the dequeue wait_for() condition, likely
due to the main thread terminating early, which didn't happen in older
python versions. Simply waiting for all worker threads to terminate
fixes the issue.

Fixes #1306.
2022-06-22 13:51:23 -06:00
Eric Le Lay b1bd429be0
Merge pull request #1246 from auouymous/ondemand-html-description
Generate HTML episode description only when needed.
2022-06-20 13:25:00 +02:00
Eric Le Lay 0acaee4ef9 get chapters from feedparser 2022-06-19 11:56:12 -06: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
auouymous 97d9459b90 Add episode art URL and chapters to database.
Co-authored-by: Eric Le Lay <elelay@macports.org>
2022-06-19 11:56:12 -06:00
JKAbrams 0a51542ab5
Add download retry without authentication if auth is set (#1300)
* Add download retry without authentification if auth is set
2022-06-16 15:37:30 -07:00
auouymous 4d4ad7f7cb Make the About dialog text selectable to copy version.
Fixes #1302.
2022-06-16 16:27:05 -06:00
auouymous c9ad2b6884 Add setting to disable find-as-you-type.
The new setting defaults to enabled to preserve the current behavior of
opening search fields in channel and episode lists when the user begins
typing. Disabling the feature ignores the keypresses and requires ctrl-f
or ctrl-shift-f to open or focus the search field.
2022-06-10 23:26:09 -06:00
Teemu Ikonen 7019eb8870 Allow marking non-dowloaded episode as deleted 2022-06-08 23:16:18 +03:00
Teemu Ikonen b7b0a87ecd Re-enable update_channel_action after update 2022-06-08 23:16:15 +03:00
auouymous ce6ba8eced Remove space between 'more' and ellipsis character. 2022-06-07 13:37:13 -06:00
auouymous f8d1b22909 Use ellipsis character instead of '...' for deleted titles. 2022-06-07 13:34:15 -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
Teemu Ikonen 4996a58475 Fix codestyle (make lint) 2022-06-02 20:59:12 +03:00
Teemu Ikonen 6105ec55e4 preferences: Add a hack to maximize on mobile screen 2022-06-02 20:59:08 +03:00
Teemu Ikonen 223b9fb9a5 Add flap to desktop/preferences.py 2022-06-02 20:58:06 +03:00
Teemu Ikonen b270471c17 Use desktop.preferences dialog 2022-06-02 20:58:06 +03:00
Teemu Ikonen 867fe57185 Require Gdk version 3.0 everywhere 2022-06-02 20:58:06 +03:00
Teemu Ikonen bce111451f Merge branch 'master' into dev-adaptive 2022-05-15 13:55:56 +03:00
Teemu Ikonen 241c656b15 Do not mark episodes streamed from episode selector as played 2022-05-15 13:40:56 +03:00
Teemu Ikonen 40e524b8ab episodeselector: Add a Stream button 2022-05-15 13:40:44 +03:00
auouymous 3e827c771b Recycle forced download tasks when finished.
Using "Start download now" creates a forced task that wasn't recycled
when it finished. This prevented it from being deleted because
can_delete() returns False for tasks in the DONE state.
2022-05-13 20:27:21 -06:00
Eric Le Lay 5eeda318f4
Fix #864 add undownload checkbox in delete episode confirm dialog (#1284)
* Fix #864 add undownload checkbox in delete episode confirm dialog

don't mark episodes new if we don't delete them now

when a mix of downloaded and not downloaded and old episodes
are selected
2022-05-13 01:35:32 -07:00
auouymous 14ea9008fc
Merge pull request #1285 from auouymous/open-episode-download-folder
Add context menu item to open episode download folder.
2022-05-13 00:40:00 -07:00
auouymous b91ea586bc Add open download folder menu item to Episodes menu. 2022-05-13 01:37:13 -06:00
auouymous 741530f5fe
Merge pull request #1287 from auouymous/fix-warnings
Fix warnings
2022-05-13 00:22:08 -07:00
auouymous f6a919759f Remove erroneous logger parameter when failing to get Youtube GDPR URL.
Reported-by: Teemu Ikonen <tpikonen@gmail.com>
2022-05-08 16:09:21 -06:00
Teemu Ikonen 03a6aabf96 Merge branch 'master' into dev-adaptive 2022-04-30 23:48:12 +03:00
auouymous 33aaf2a4eb Close config file after loading it.
Prevents a ResourceWarning when all warnings are enabled.
2022-04-29 02:54:32 -06:00
auouymous 41c312dd68 Change deprecated logger.warn() to logger.warning(). 2022-04-29 02:54:32 -06:00
auouymous 389d096854 Close extension file after reading metadata.
Prevents a ResourceWarning when all warnings are enabled.
2022-04-29 02:54:32 -06:00
auouymous 961f0d72bb
Merge pull request #1274 from tpikonen/narrow-prefs
A narrower preferences dialog
2022-04-29 01:48:13 -07:00
Teemu Ikonen 3a5a8ce990 preferences: Ellipsize playlist folder button label 2022-04-29 11:40:28 +03:00
auouymous 125ee1dfd2 Add context menu item to open episode download folder.
Closes #579.
2022-04-26 04:43:15 -06:00
auouymous f49068311e
Merge pull request #1272 from auouymous/show-episodes-without-enclosures
Show episodes without downloadable content.
2022-04-26 00:12:58 -07:00
Thomas Perl 3cbb36167c Gtk UI: Handle links in HTML shownotes 2022-04-23 13:54:31 +02:00
auouymous 16777ba5eb Enable new status toggle in Episodes menu when any episode is selected.
The menu item was only enabled when the selected episode could be played
or streamed. It was always enabled in the context menu but the keyboard
accelerator could not be used if the episode was not downloaded and not
streamable.

This also forces the play toolbar button to always show the 'open'
label and icon in the progress tab, instead of whatever random state it
was in before.
2022-04-19 04:13:57 -06:00
auouymous 5d304cbf3d Add comments about never unsetting play_or_download() flags once set. 2022-04-19 01:36:03 -06:00
auouymous 3a4b06f3eb
Merge pull request #1269 from auouymous/can-lock
Allow toggling lock of any locked or undeleted episode.
2022-04-19 00:29:10 -07:00
auouymous 1cc7941331 Show episodes without downloadable content.
Non-media RSS feeds only have a textual description and can't be
subscribed to in gpodder. Some media feeds lack downloadable content and
can only be accessed from the website. In both cases, gpodder removes
the episodes without any feedback to the user as to why, making it
appear to be a problem in gpodder.

This patch adds those episodes but prevents automatic download and
displays a proper error when a manual download is attempted. The
episodes also get a web browser icon to indicate they lack downloadable
content. While not downloadable or transferable to media devices,
gpodder can be used to notify the user when new episodes are available
and they can be accessed by clicking through to the website
2022-04-19 01:24:20 -06:00
lexolexo 778f5b708c
Added logic to trim away leading/trailing whitespaces in user-clipboard auto-inputted urls (#1276)
* Added logic to trim away leading/trailing whitespaces in user-inputted
urls. Tested against current gpodder-installe executable for correct/
desired behaviour. simplified receive_clipboard_text method of class
gPodderAddPodcast in addpodcast.py
resolves #520
2022-04-16 22:11:10 -07:00
Teemu Ikonen d6447d1bfb preferences: Enable word wrapping in checkbox labels 2022-04-13 16:28:25 +03:00
Teemu Ikonen 3d85283bac preferences: Allow a narrower Video page
* Replace Grid with FlowBox in Video page
 * Don't set hexpand on ComboBoxes
 * preferences.py: Ellipsize video format selector combobox strings
2022-04-13 16:28:25 +03:00
Teemu Ikonen b1ef6e0859 preferences: Allow a narrower Devices page
* Enable word wrap in labels
 * Replace GtkGrid with two vertical GtkBoxes
 * Add bottom margins to checkbuttons as label wrapping space
 * preferences.py: Ellipsize device button label, replace deprecated
   set_alignment() with set_xalign()
2022-04-13 16:28:25 +03:00
Teemu Ikonen cd15106eac Merge branch 'master' into dev-adaptive 2022-04-12 16:53:23 +03:00
Teemu Ikonen d3ccce258c
preferences: Use GtkStack instead of GtkNotebook (#1261)
* preferences: Use GtkStack instead of GtkNotebook

* Add Separator and ScrolledWindow to StackSwitcher

* Add ScrolledWindow to preferences Stack

Remove ScrolledWindow from Extensions page.
2022-04-10 04:17:53 -07:00
auouymous 8cefb936c5 Allow toggling lock of any locked or undeleted episode.
This allows undownloaded episodes to be locked with both menus and
guarantees both menus remain consistent.
2022-04-10 03:48:59 -06:00
Teemu Ikonen 0ab57fb2b1 Fix 'Mark episodes as old' context menu item 2022-03-25 23:43:18 +02:00
Teemu Ikonen c156e15ed3 Don't use shownotes keyboard callback 2022-03-25 23:43:18 +02:00
Teemu Ikonen 52e631bc73 gPodderShownotesLabel: Double html.escape link titles 2022-03-25 23:43:18 +02:00
Teemu Ikonen 542a3a9a2a Merge branch 'master' into dev-adaptive 2022-03-25 22:52:37 +02:00
Teemu Ikonen fb0b45dfe1 Merge commit 'a35e81fe0e52fc1d91ec3ebce4b1da4a4fea0ed9' into dev-adaptive 2022-03-25 22:23:55 +02:00
Teemu Ikonen b4892c3baa Merge commit '5043b0b192b80a061376faee3abecbb7406c61a1' into dev-adaptive 2022-03-25 21:47:56 +02:00
Teemu Ikonen 96db3d7cd4 Merge commit 'bc65930578445e7614a0b99874f33faadba88277' into dev-adaptive 2022-03-25 21:28:15 +02:00
Teemu Ikonen 57589db825 Merge commit '91829b82f6831f1bea7b5d7701117c52463f350b' into dev-adaptive 2022-03-25 21:22:24 +02:00
Teemu Ikonen d3fc65377f Merge commit 'cd35e29fa1d627d206b556421d92907a64ed028c' into dev-adaptive 2022-03-24 22:44:10 +02: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 01cd2696f7 Refactor play_or_download() episode action code.
Streaming was always possible (#867) for all audio and video episodes if
an audio player was configured. Now it is only possible if a player is
configured for the episode's type.

Methods have been added to PodcastEpisode that are either now used by
actions or replicate the conditions used by actions to filter
selections. This will help prevent mismatched conditions between
play_or_download() and episode actions. And play_or_download() is easier
to reason about and should prevent future bugs such as #1250.

Fixes #1250.
2022-03-20 02:50:46 -06:00
auouymous 5cbd3175b2 Group Play with Preview and Stream since all three use the same icon. 2022-03-20 02:40:51 -06:00
auouymous 5314617e1f
Merge pull request #1213 from auouymous/fix-1212
mount_volume_for_file() must only use Gtk when the Gtk UI is available.
2022-03-16 16:09:26 -07: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
Eric Le Lay a35e81fe0e
Merge pull request #1249 from auouymous/set-episode-toolbar-menu-actions
Set episode toolbar and menu actions.
2022-03-16 22:44:40 +01:00
Eric Le Lay 2ee8c23b31 fix #1227 pixbuf could be None in some cases
I couldn't reproduce it but I guess it's possible
2022-03-16 22:29:18 +01:00
Eric Le Lay 5043b0b192
Merge pull request #1248 from auouymous/cancel-failed-tasks
Allow failed downloads to be cancelled from episodes list.
2022-03-16 21:10:01 +01:00
auouymous dabd6b3353 Also toggle delete in Episodes menu when toggling lock. 2022-03-16 05:39:19 -06:00
auouymous de2094253a Set episode toolbar and menu actions.
Items in the Episode menu were not disabled when the progess tab was
opened. This consolidates the enabling and disabling of buttons in the
toolbar and items in the Episodes menu, and fixes that issue.

It also changes the label and icon for the toolbar play button to be
Open, Play, Preview or Stream.
2022-03-16 05:15:44 -06:00
auouymous 3a60f36876 Disable episode delete menu item when it can't be used.
Locked episodes can not be deleted, but the delete menu item remained
active for them.
2022-03-16 02:38:12 -06:00
auouymous f0156e1bda Directly access the Extras menu to add extension menu items. 2022-03-16 02:20:26 -06:00
auouymous fdccfec41c Fix downloading file count when pausing or cancelling synchronizing tasks.
PR #1243 added separate pausing and cancelling counts, and included them
in the downloading file count. However, synchronizing tasks can also be
pausing or cancelling and would erroneously be included in the
downloading file count.
2022-03-16 01:58:34 -06:00
auouymous f91f9e29b1 Change order of progress button status counts. 2022-03-16 01:47:36 -06:00
auouymous 6731b63706 Allow failed downloads to be cancelled from episodes list.
This not only removes the failed download from the progress list, but
also removes the error icon from the episode list.
2022-03-15 19:51:45 -06:00
auouymous bc65930578
Merge pull request #1244 from auouymous/undelete-episode-on-download
Undelete deleted episodes when a download is attempted.
2022-03-15 15:06:45 -07:00
auouymous 4313db72c0
Merge pull request #1243 from auouymous/nr-cancelling-pausing-tasks
Show number of pausing and cancelling tasks in progress tab.
2022-03-15 15:04:55 -07:00
auouymous 91829b82f6
Merge pull request #1242 from auouymous/pause-resume
Add pausing and resuming from Episodes and context menus, and toolbar.
2022-03-15 14:58:00 -07:00
JuanCanham d7b5843123
Make error message more verbose on NotFound sync error (#1235)
* Make error message more verbose on NotFound sync error

* Add Spanish translation

Co-authored-by: Rioting Pacifist <linux@riotingpacifist.net>
2022-03-08 21:59:40 -07:00
auouymous d0ad77b9a7 Undelete deleted episodes when a download is attempted.
In the event of a download failure, the error icon will properly
display, and the episode will remain undeleted after a restart for
another download attempt.
2022-03-08 17:38:50 -07:00
auouymous e1d90d8765 Show number of pausing and cancelling tasks in progress tab.
These transitions can sometimes take a while and this will provide some
feedback to the user that the transition is happening.
2022-03-08 17:06:31 -07:00
auouymous 6f0f623ead Add pausing and resuming from Episodes and context menus, and toolbar.
Queued and downloading episodes can now be paused from the episode list,
and the download button can then be used to resume the paused episode.

Fixes #1162.
2022-03-08 06:21:10 -07:00
auouymous a83b750459 Catch youtube 404 errors.
Avoids parsing the 404 error page as XML and then throwing malformed XML
errors.
2022-02-27 20:46:50 -07:00
auouymous 20dd397e9e Memoize youtube channel ID and feed data.
Internal youtube support and the youtube-dl extension both cause the
youtube feed URL to be fetched three times per update. Caching the feed
data from feedcore allows internal support to only load the feed once.
The lru_cache removes one of the youtube-dl fetches, not perfect, but
two is better than three. I saw a 40% decrease in update times when
using the internal youtube code.

Throwing an exception from get_channel_id_url() prevents get_cover() and
get_channel_desc() from attempting to fetch a None URL, and provides
more accurate errors.

The lru_cache on get_youtube_id() saves 1ms per youtube channel when
updating. Which adds up with a lot of channels, and might be more on
slower devices.
2022-02-27 02:52:06 -07:00
auouymous f7497c617a Create partial file when reusing cancelled tasks.
The partial file for a cancelled task is deleted, but the task is not
removed from progress list while other tasks are downloading.
Downloading the cancelled episode again would reuse the existing task
without creating a new partial file. This prevented resuming the
download after restarting gPodder, and caused the youtube-dl extension
to fail if used to re-download it.
2022-02-08 03:57:22 -07:00
auouymous 8f9b95bfb8
Merge pull request #1219 from auouymous/ytdl-partial-files
YoutubeDL partial file fixes
2022-02-07 23:17:42 -07:00
auouymous 61b13f514a Add mnemonics for channel and podcast directory dialog buttons. 2022-02-06 02:33:18 -07:00
Teemu Ikonen e9cb4e9eaa Fix typo on do_save_episode() strings 2022-02-05 22:22:38 +02:00
Teemu Ikonen 3f64a58fa9 gPodderExportToLocalFolder: Use GtkDialog.add_buttons()
Create the dialog buttons with GtkDialog.add_buttons(). This places them
either to the dialog action area, or to the headerbar, accoording to the
system setting.

Also set 'do-overwrite-confirmation' property of the Dialog to False.
2022-02-05 22:22:38 +02:00
Teemu Ikonen cab3629813 Merge branch 'master' into dev-adaptive 2022-02-04 12:30:02 +02:00
Teemu Ikonen 4453316aa8 Merge tag 'merge5' into dev-adaptive 2022-02-04 12:22:51 +02:00
Teemu Ikonen 75c3d49b5e Merge tag 'merge4' into dev-adaptive 2022-02-04 12:07:33 +02:00
Teemu Ikonen 9aebe95020 Merge tag 'merge3' into dev-adaptive 2022-02-04 11:39:36 +02:00
Teemu Ikonen 28c5774f89 Merge tag 'merge2' into dev-adaptive 2022-02-04 10:56:20 +02:00
Teemu Ikonen 0e1c0b209e Merge tag 'merge1' into dev-adaptive 2022-02-04 10:55:32 +02:00
Teemu Ikonen 222dba31be GtkBuilderWidget: Remove '_builder_expose' kwarg, add '_gtk_properties'
The '_builder_expose' argument to GtkBuilderWidget.__init__() allowed
binding of names in the ui-file to objects defined outside of the
ui-file.

Glade does not allow setting properties to values which are not defined
in the ui-file, so we set GTK/Gobject properties explicitly. This is
made with a new kwarg '_gtk_properties' in GtkBuilderWidget.__init__()
which is a dict with a (object_id, property_name) key.
2022-02-02 12:14:30 +02:00
Teemu Ikonen cb61d76474 Replace Gtk.STOCK_ button labels with strings 2022-02-02 12:13:24 +02:00
Teemu Ikonen 282996cd16 Replace Gtk.STOCK_ icons with standard icon names 2022-02-02 09:31:27 +02:00
Teemu Ikonen 011718c032 gPodderShownotesHTML: Replace Gtk.Action with Gio.SimpleAction
Gtk.Action is deprecated.
2022-02-02 09:31:27 +02:00
auouymous 9d72872c50 Clean up parial files created by cancelled YoutubeDL downloads.
YoutubeDL can append an extension to the partial file, creating
additional partial files. Adaptive formats create up to three more
partial files. Cancelling a download will leave behind these extra
partial files, and requires manual removal outside of gPodder.
2022-02-01 22:09:00 -07:00
auouymous 41b8f52fbf mount_volume_for_file() must only use Gtk when the Gtk UI is available.
Fixes #1212.
2022-01-25 14:32:04 -07:00
auouymous 3ff7ed37a5 Show 'Syncing' in progress tab instead of 'Downloading' when syncing. 2022-01-25 00:58:27 -07:00
auouymous c2d70b5e29 deviceplaylist should require Gio, not Gtk.
Fixes #1212.
2022-01-24 14:27:23 -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
auouymous 57045619d3 Also open dialog if xdg-open is not found when opening a folder. 2022-01-16 22:02:27 -07:00
Benedikt Wildenhain 34098c19fc
Open error dialog if user tries to use not-installed program
Currently trying to use default player (xdg-)open when it's not installed
will only cause messages on the console, which might not be visible to
the user. This PR creates an alert box in this case.

Fixes #1003.
2022-01-16 18:24:41 +01:00
Eric Le Lay 40fd34b14a
Merge pull request #1206 from auouymous/fix-1195
Fix shownotes for episodes that contain HTML comments.
2022-01-03 09:32:33 +01:00
auouymous 3938809dd5 Fix shownotes for episodes that contain HTML comments.
When html5lib is used, a function is returned for each comment in the
HTML. It should be safe to skip functions until something else is found
to use them that causes issues finding hyperlinks.

Fixes #1195.
2022-01-01 18:15:51 -07:00
Eric Le Lay b8065cadf7 fix 1190 ERROR: Could not create save_dir on windows
"C:\gpodder-xxx\config\Downloads" results in
scheme="c" and path="\gpodder-xxx\config\Downloads"
(not double backslash)
2021-11-28 22:02:12 +01:00
Eric Le Lay ec6b63960c
Merge pull request #1191 from gpodder/fix-1190-gio-windows
fix #1190 ERROR: Could not create save_dir on windows with gio
2021-11-06 16:12:11 +01:00
Eric Le Lay 00b421b929 fix #1190 ERROR: Could not create save_dir on windows with gio
util.new_gio_file returned a GDummyFile, where every operation failed,
in this case make_directory_with_parents.
2021-11-01 16:36:57 +01:00
Marcel Ackermann 2f42c11e59
remove unused import
closes https://github.com/gpodder/gpodder/issues/1187
2021-10-30 11:13:00 +02:00
auouymous 10e48a3ea5
Merge pull request #1174 from auouymous/fix-youtube-json
Improve Youtube initial player response regular expression.
2021-10-28 03:31:24 -07:00
auouymous ce99daf065
Merge pull request #1171 from auouymous/fix-1147
Fix youtube-dl re-download after a failed download
2021-10-28 03:27:56 -07:00
auouymous 5499658ee3
Merge pull request #1172 from tpikonen/stockless-episodeselector
Remove deprecated GTK features from episodeselector
2021-10-28 03:23:30 -07:00
Teemu Ikonen 5990e57a81 episodeselector: Add underline mnemonics to all buttons
Set use-underline on all buttons in gpodderepisodeselector.ui.

Add underscore mnemonics to the special 'gpodder-download' button and in
'remove-button' and 'ok-button' args of callers in main.py.
2021-10-18 15:30:54 +03:00
auouymous cae617701f Support youtube 'user' feed URLs in for_each_feed_pattern(). 2021-10-14 19:28:05 -06:00
auouymous 8a403d2783 Optimize get_youtube_id().
The watch URL is the most common and should be checked first. The swf
URL probably no longer works but can be kept for compatibility.
2021-10-14 19:19:12 -06:00
auouymous 6ced881d74 Improve Youtube initial player response regular expression.
The text may contain "};" patterns inside the initial player response.
And the non-greedy regex would fail to match the entire IPR, causing it
to fail during JSON decoding.
2021-10-13 21:58:24 -06:00
auouymous 8d0bfce460 Remove dead code in get_foreground_color(). 2021-10-13 15:34:26 -06:00
Teemu Ikonen ce66b5fa62 episodeselector: Remove GtkStock usage
* Rename gPodderEpisodeSelector constructor kwarg 'stock_ok_button'
   to 'ok_button'. Change callers in main.py to use it with text labels
   instead of Gtk.STOCK_* values
 * Set transient for parent widget
2021-10-12 23:14:14 +03:00
auouymous db2aa385d0 Cancel failed task before streaming.
livestream to be streamed, after realizing it was a livestream. This
however caused the youtube-dl extension to fail when downloading DRM
content after gpodder failed to download it, because the partial file
was missing.

This removes that fix and properly cancels the failed task before
streaming to remove the partial file.

Fixes #1147.
2021-10-11 20:11:18 -06:00
auouymous 263c4ad9fe Actually delete partial file when cancelling.
Calling run() with CANCELLED state only returns without performing any
work. The CANCELLING state actually deletes the partial file and
recycles the task.
2021-10-11 19:53:00 -06:00
Eric Le Lay 69e242184c
Merge pull request #1145 from auouymous/delay-window-position-restore
Delay restoring window position until after it has been shown.
2021-10-11 22:16:42 +02:00
Eric Le Lay 3aba6ddea5
Merge pull request #1156 from tpikonen/stockless-dialogs
Remove deprecated GTK features from simple dialogs
2021-10-09 18:06:01 +02:00
auouymous ab61a04d0c
Merge pull request #1161 from auouymous/paused-episode-icon
Paused episode icon
2021-10-05 18:48:25 -07:00
auouymous 9daca64e2e
Merge pull request #1160 from auouymous/use-icons-for-pausing-cancelling
Use icons when pausing or cancelling tasks.
2021-10-05 18:31:11 -07:00
Teemu Ikonen e8c6969abd gPodderExportToLocalFolder: Remove deprecated GTK stock items
gpodderexporttolocalfolder.ui:
 * Save with Glade 3.38.2
 * Replace GTK stock labels with text

exportlocal.py: Set transient for parent (was not set before)
2021-09-17 22:11:10 +03:00
Teemu Ikonen 6483059d41 gPodderConfigEditor: Remove deprecated GTK features
gpodderconfigeditor.ui:
 * Save with Glade 3.38.2, require GTK 3.16
 * Replace gtk-close with text label
 * Use Dialog internal action_area for Close button
 * Add underline accelerator for '_Show All'

configeditor.py: Set transient for parent
2021-09-17 22:11:10 +03:00
Teemu Ikonen 1ef54e3216 gPodderAddPodcast: Remove deprecated GTK stock items
gpodderaddpodcast.ui:
 * Save with Glade 3.38.2, require GTK 3.16
 * Set can-focus to True where needed
 * Replace GTK stock labels with text

addpodcast.py: Set transient for parent
2021-09-17 22:11:10 +03:00
Teemu Ikonen f1739d3212 gPodderWelcome: Remove deprecated GTK features
gpodderwelcome.ui:
 * Save with Glade 3.38.2
 * Replace gtk-cancel stock with text label
 * Replace padding with margins
 * Replace border-width with margins
 * Set can-focus to True on buttons

welcome.py: Set transient for parent
2021-09-17 22:11:10 +03:00
auouymous 6feb312936 Don't recycle failed or paused tasks. 2021-09-16 18:01:10 -06:00
auouymous d20fbbe8a0 Set a paused icon in episode list when an episode is paused. 2021-09-14 04:10:40 -06:00
auouymous d508a3df8d Show paused tasks in progress tab. 2021-09-14 03:34:27 -06:00
auouymous 65aa1c679a Use icons when pausing or cancelling tasks.
This avoids shifting the list left and then right for single tasks. It
also gives more feedback that the task is being paused or cancelled.
2021-09-14 02:40:17 -06: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 c86c7412ae remove unused variables 2021-09-13 15:45:39 +01:00
Teemu Ikonen 2ded35705e
Preferences: Remove deprecated GTK features (#1154)
* gpodderpreferences.ui: Save with Glade 3.38.2

* gpodderpreferences.ui: Add tab label children

* gpodderpreferences.ui: Return notebook pages to correct order

* gpodderpreferences.ui: Use named icons, replace stock-ids

* gpodderpreferences.ui: Remove extra rows and columns from table_video

* gpodderpreferences.ui: Use traditional indicator for CheckButtons

* gpodderpreferences.ui: Set can-focus to True where appropriate

* gpodderpreferences.ui: Add border-width to mygpo_config

* gpodderpreferences.ui: Add margins around dialog ButtonBox

* gpodderpreferences.ui: Replace gtk-close stock label with text

* preferences.py: Set transient for parent

* podcastdirectory.py: Set transient for parent

This was accidentally removed in d9a0c7d15a.

* gpodderchannel.ui: Downgrade GTK requirement to 3.16

* README.md: Increase minimum GTK version to 3.16
2021-09-10 17:14:12 -07:00
auouymous 3d966b95b2
Merge pull request #1149 from blushingpenguin/queue
#1117, #1137: fixes for pause/resume/cancelling download tasks
2021-09-08 16:23:18 -07:00
auouymous 9d92e86bc1
Merge pull request #1141 from auouymous/delay-column-reorder
Delay episode treeview column reordering.
2021-08-31 22:03:40 -07:00
blushingpenguin 20b0ed3aae #1117, #1137: fix another lint issue 2021-08-31 14:43:55 +01:00
blushingpenguin 3c322b610a Merge branch 'master' into queue 2021-08-31 14:42:20 +01:00
blushingpenguin 723c052fc2 #1117, #1137: fix lint issue 2021-08-31 14:40:13 +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
auouymous dd299bce25 Delay restoring window position until after it has been shown.
The window manager might not honor the move request until after the
window is shown. This can cause window contents to be rendered at
a shifted offset inside the window borders.
2021-08-28 02:59:46 -06:00
Thomas Perl 4310fdbf5e Gtk UI: Use a TextView for dialogs with multiple text lines 2021-08-28 09:06:01 +02:00
Thomas Perl 7a4afcc198 Gtk UI: Use secondary text in Gtk.MessageDialog for formatting 2021-08-28 09:02:24 +02:00
auouymous a8386049af Delay episode treeview column reordering.
Moving columns before shown can produce "Negative content height"
warnings for themes with vertical padding or borders on treeview header
buttons.
2021-08-26 05:34:16 -06:00
Eric Le Lay 9a3eda7d6b
Merge pull request #1130 from auouymous/youtube-duration
Query duration for youtube episodes when not using youtube-dl.
2021-08-18 14:11:07 +02:00
Eric Le Lay 78bff43731
Merge pull request #1131 from auouymous/move-scale_pixbuf-to-util
Move scale_pixbuf to util.py and apply #1107 refactoring.
2021-08-18 14:09:21 +02:00
Eric Le Lay 90d2112c76
Merge pull request #1108 from ollieparanoid/close-after-startup
bin/gpodder cli: add sections and --close-after-startup option
2021-08-18 14:06:49 +02:00
auouymous d0171a7c8c Allow distributions to disable the update check.
Fixes #1103.
2021-08-16 18:37:33 -06:00
Oliver Smith ec60a55c36
bin/gpodder: add --close-after-startup option
Add an option that helps with measuring / profiling startup performance.
2021-08-15 20:36:45 +02:00