Commit Graph

1256 Commits

Author SHA1 Message Date
Bart De Vries 1b3df48ce8 Solve TODO: unload entry from audio player when it's removed from the queue 2021-07-04 16:51:47 +02:00
Bart De Vries d0bc5b2b26 Add capability to check whether network connection is metered
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.
2021-07-03 20:20:27 +02:00
Bart De Vries acef37fa58 Fix database migration by avoiding DROP COLUMN AND ADD COLUMN 2021-06-29 20:52:40 +02:00
Bart De Vries 3a24ea6f65 Avoid RENAME COLUMN to make db migration more robust
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.
2021-06-28 08:04:41 +02:00
Bart De Vries e0154355aa Fix drawer handle positioning for settings and about Pages 2021-06-27 10:44:43 +02:00
Swapnil Tripathi 17e8e75993 Highlighting the current menu item in the GlobalDrawer. 2021-06-27 03:57:49 +05:30
Bart De Vries 265b3109cb Make EntryPage close when that entry is deleted from the DownloadListPage 2021-06-24 17:13:04 +02:00
Bart De Vries bcafb26c8c Add filesize units to download progress
This adds the currently downloaded size and the total enclosure size to
the entry delegate.
2021-06-24 17:12:07 +02:00
Bart De Vries d7debaaf30 Rework Download list page
This page now has section headers, and show Downloading, Partially
Downloaded and Downloaded enclosures with relevant actions for each.
2021-06-24 11:49:24 +02:00
Bart De Vries f197e6ab02 Implement Enclosure::PartiallyDownloaded status
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.
2021-06-23 23:04:18 +02:00
Bart De Vries 03081edc66 Improve estimate of enclosure download size, also when resuming 2021-06-23 22:29:15 +02:00
Bart De Vries 69a87b1afc Add icons needed for OverlaySheet on android 2021-06-23 17:17:28 +02:00
Bart De Vries e86111ed55 Move error list to settings page (as overlaysheet) 2021-06-22 16:26:43 +02:00
l10n daemon script 159688035a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-06-22 01:20:30 +00:00
l10n daemon script c7a510335a GIT_SILENT made messages (after extraction) 2021-06-22 00:19:16 +00:00
Bart De Vries f42c0116ce Change bugtracker url to bugs.kde.org
Since we have a product on bugs.kde.org which already has several bugs
registered, we might as well use it as the main place for externally
reported bugs, and keep gitlab issues as internal tracker.
2021-06-21 17:39:56 +02:00
Bart De Vries a331366d41 Replace Audio prepare hack by nicer, asynchronous solution
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.
2021-06-20 19:14:07 +02:00
Devin Lin 9539daecf4 Add flathub badge 2021-06-20 15:00:59 +00:00
Bart De Vries 49977adc38 Refactor Error implementation and add Error::Type
- 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)
2021-06-19 17:09:44 +02:00
Bart De Vries 719879072e Workaround for kde_configure_git_pre_commit_hook not working on android CI 2021-06-19 17:05:04 +02:00
Bart De Vries bd738610bc Small fixes in androidlogging.h 2021-06-19 15:35:56 +02:00
Bart De Vries 70024b0865 Add clang-format git hook 2021-06-19 13:39:49 +02:00
Bart De Vries 14868bf04e Apply clang-format 2021-06-19 13:29:47 +02:00
Bart De Vries 4d6d8ae940 Add basic logging capabilities on android.
This implements debug logging which can be checked through logcat.
2021-06-19 00:26:24 +02:00
Bart De Vries 60432619f1 Bump minimum cmake version
FindKF5.cmake requires cmake minimum version 3.16
2021-06-19 00:26:24 +02:00
l10n daemon script aace877660 GIT_SILENT made messages (after extraction) 2021-06-18 00:19:56 +00:00
Bart De Vries 0c7e5ca63b Do not try to read enclosure length on entries that don't have an enclosure 2021-06-16 09:25:52 +02:00
Bart De Vries 048f294b2b Fix inhibit suspend on Gnome
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).
2021-06-15 13:03:41 +02:00
Devin Lin aed1a943ab Use apps.kde.org link for homepage 2021-06-13 01:04:15 +00:00
Devin Lin 7155c4f7ee Add homepage url to appdata 2021-06-11 21:22:50 +00:00
Bart De Vries 26d3755922 Use debug categories in fetcher.cpp for partial downloads 2021-06-11 20:30:15 +02:00
Bart De Vries 1f35c0a25c Don't clean up partial downloads, such that they can be resumed 2021-06-11 16:59:03 +02:00
Bart De Vries a24fb7d731 Get correct enclosure file size as soon as possible when download starts 2021-06-11 16:59:03 +02:00
Bart De Vries d24b7ed7d0 Write downloads to disk and enable download resume
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.
2021-06-11 16:59:03 +02:00
l10n daemon script cb714eb2b1 GIT_SILENT made messages (after extraction) 2021-06-11 00:19:42 +00:00
Bhushan Shah ae1834761c GIT_SILENT: appdata: add announcement URL 2021-06-10 13:54:15 +05:30
Bhushan Shah 8671ec8aa4 GIT_SILENT Update version number for 21.06 2021-06-09 20:11:18 +05:30
l10n daemon script f6421db2e8 GIT_SILENT made messages (after extraction) 2021-06-09 00:20:23 +00:00
Bart De Vries 6d57a0586b Explicitly set logo for about page to logo.sv resource file 2021-06-08 15:44:44 +02:00
Bart De Vries 0b8c1856c9 Mark episode as unread when adding to queue 2021-06-08 14:19:50 +02:00
Bart De Vries 4187e05310 Remove filter for <li> and <ul> tags in entry content 2021-06-08 13:33:09 +02:00
Bart De Vries 3be595ab8e Add appdata description for 21.06 release 2021-06-08 11:02:52 +02:00
Tobias Fella 6a95dfe4ed Try fixing logo not visible in AboutPage on android 2021-06-08 00:48:34 +02:00
Swapnil Tripathi 20c10d9380 Small Fix. 2021-06-08 02:52:11 +05:30
l10n daemon script b0bcb9d668 GIT_SILENT made messages (after extraction) 2021-06-06 00:20:14 +00:00
Bart De Vries 2ed33aa750 Add debugging logging categories 2021-06-05 22:03:22 +02:00
Bart De Vries 8437a44a7b Remove obsolete timeString method 2021-06-05 11:59:57 +02:00
l10n daemon script 4221d5fa9d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-06-05 01:17:37 +00:00
l10n daemon script 087a835b64 GIT_SILENT made messages (after extraction) 2021-06-05 00:18:49 +00:00
Bart De Vries e311a1d1d4 Avoid resizing or re-coloring globaldrawer on mobile 2021-06-04 14:02:28 +02:00