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
The "New Episodes" tab is to be replaced by a filter view button and
dialog to be able to filter several episode statuses. I.e. new,
played / not played, etc.
This reverts commit 5c8a6ea6a4.
It turns out that the issue is caused by qqc2-desktop-style and
qqc2-breeze-style. The problem should be solved upstream. And, anyway,
this workaround didn't completely solve the issue either.
Kasts can currently only handle one enclosure per entry. In case an
entry/item has multiple enclosures, it's probably safe to assume that the
first one is the one that's preferred by the author.
CCBUG: 440389
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.
RENAME COLUMN was only introduced in sqlite 3.25. So it's probably
better to avoid it for the time being to increase compatibility with
older versions.
Still to be done:
- Update Download Page to show partial downloads.
- Connect signals to Download Page to update whenever an enclosure
changes status. This is broken by this commit because
downloadCountChanged has been removed.
The main bits of this implementation are:
- Start a new track in paused state. We don't care about the actual
media state or player state that QMediaPlayer is reporting. We will
deal with that when the audio actually starts playing.
- If a player position needs to be restored, we set d->m_pendingSeek to
the position that needs to be seeked. We don't actually seek because
we have no idea what state the player is in yet.
- On the positionChanged signal of QMP, and if the media is buffered, we
check if there is pendingSeek value set which is set to a different
value than the current player position. If so, we call
d->m_player.setPosition(). If we have arrived at the correct
position, then we reset d->m_pendingSeek to -1.
- In the position(), duration() and seek() methods, we return sensible
values, even QMP is not. So, we report the duration from the
enclosure, the position from d->m_pendingSeek, and let seek() change
the value of d->m_PendingSeek (if it's not -1) to the new seek
position.
- When there's a pending seek, we set the notifyInterval to shorter
interval to reduce the startup audio glitch as much as possible. We
then reset it to the default of 1000 msec.
This was tested on linux and android.
- 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)
The inhibit dbus call to gnome sessionmanager expects flags as input.
Currently the flags are set to 4, which will "Inhibit the session being
marked as idle". This is insufficient to prevent the device from
suspending while playing.
We should also add 8 = "Inhibit suspending the session or computer".
Hence, the updated flags to 12.
This change was tested on phosh/phoc and it properly prevents the
system from suspending. The flags = 12 settings is also what gnome
music players like Lollypop are using (as checked through the gnome
sessionmanager dbus interface).
This enables the download method in Fetcher to resume in case a partial
download is already saved to disk.
For full implementation of download resumes, more changes are required,
because the current application will automatically clean up files that
don't match the expected size at startup.