This commit adds a bunch of API extensions (public and private) to the
entry, enclosure, etc classes to allow runtime updates of internal data.
Additionally, the feed update routine has been adapted to find updates
in entries, enclosures, etc and pass them on to the relevant objects.
All of this functionality is put behind a new toggle exposed in the
settings (default is on). This is useful since a full update takes
quite a bit longer on underpowered hardware, so users should be able to
switch off this potentially non-essential overhead.
BUG: 446158
This contains the following changes:
- Use separate db connections for feed updates (required for
multithreading.
- Add ThreadWeaver dependency.
- Port update job from KJob to ThreadWeaver::Job
- This should also solve the bug where the update process would hang
on the "processEvents" call, which was intended to keep the UI
responsive during updates.
BUG: 452585
This implements the gpodder API from scratch. It turned out that
libmygpo-qt has several critical bugs, and there's no response to pull
requests upstream. So using that library was not an option.
The implementation into kasts consists of the following:
- Can sync with gpodder.net or with a nextcloud server that has the
nextcloud-gpodder app installed. (This app is mostly API compatible
with gpodder.)
- Passwords are stored using qtkeychain. If the keychain is
unavailable it will fallback to file.
- It syncs podcast subscriptions and episode play positions, including
marking episodes as played. Episodes that have a non-zero play
position will be added to the queue automatically.
- It will check for a metered connection before syncing. This is
coupled to the allowMeteredFeedUpdates setting.
- Full synchronization can be performed either manually (from the
settings page) or through automatic triggers: on startup and/or on
feed refresh.
- There is an additional possibility to trigger quick upload-only syncs
to make sure that the local changes are immediately uploaded to the
server (if the connection allows). This will trigger when
subscriptions are added or removed, when the pause/play button is
toggled or an episode is marked as played.
- This implements a few safeguards to avoid having multiple feed URLS
pointing to the same underlying feed (e.g. http vs https). This
solves part of #17
Solves #13
The feed update routine which is now spread over several methods
in Fetcher, is now put into a self-contained KJob. This will allow
to re-use this job later on in e.g. gpodder sync, where it's
required to update feeds before syncing episode statuses.
This also makes the feed update abortable.
Lastly, but most importantly, the feed update procedure has been
optimized to minimize database transactions, resulting in a dramatic
speed-up. This is especially true for importing new feeds, which
will now be at least 5x faster on slow hardware.
Context properties always takes in a QVariant, which means that
whenever you access the property it is re-evaluated because in
between each access the property may be changed as
setContextProperty() can be used at any moment in time.
The feeds will be sorted by (1) descending number of unread/unplayed
entries and (2) alphabetically by name. The current item and current
selection are maintained after re-sorting when the number of unread
entries has changed.
This commit adds keyboard navigation to entry lists.
Selection of items can be done through keyboard (shift+up/down), mouse
(left, left+shift, left+ctrl) or touch (long press).
When items are selected, contextual actions will show up on
the page (useful for touch screens), or, alternatively, a context menu
with the same actions can be opened through right mouse click (useful
for desktop).
If a single entry is selected, then only the relevant actions will be
shown (e.g. only "Mark as Played" if the entry has not been played yet).
Additionally, (database) transactions for the actions have been
optimized. This was necessary to make sure that actions on large
selections of entries finish within an acceptable time. E.g. actions on
a list of 1000 items should finish within a few seconds (on all but
underpowered hardware).
BUG: 441764
This adds a new setting to the Settings page.
Existing enclosures and images will be moved to the new location
(first copied, then deleted in the original location). If any of
the copy actions fail, the operation is aborted and the original
path is restored.
The StorageMoveJob is set up in such a way that it's easy to add other
files or subfolders in the future.
Solves #15
For now this only works with NetworkManager. The related settings are
greyed out on systems not using NetworkManager.
Some details of the implementation:
- Implement settings in the settings menu to enable/disable feed
updates, episode downloads and/ or image downloads on metered
connections. If the option(s) is disabled, an overlay dialog is shown
with options to "not allow", "allow once", or "allow always".
- If the network is down, no attempt is made to download images and the
fallback image will be used until the network is up again.
This also solves an issue where the application hangs when the network
is down and feed images have not been cached yet.
- Next to this, part of the cachedImage implementation in Entry and Feed
has been refactored to re-use code as part of the image() method in
Fetcher.
- In case something unexpected happens, an error will be logged.
- This refactoring also includes a cleanup of a lot of header includes to
avoid circular dependencies.
- The error message will now be shown below the info message.
- Add database migration (for Errors)