Commit Graph

626 Commits

Author SHA1 Message Date
Bart De Vries 7358960ac7 Fix i18n() and inconsistent buttons 2021-07-11 10:27:31 +02:00
Swapnil Tripathi 77b1656bf7 Added ToolTips. 2021-07-11 08:25:49 +00:00
Bart De Vries bdfa9f0733 Small adaptation to make FeedDetailsPage more generic 2021-07-08 15:30:44 +02:00
Bart De Vries 4b2f4afd37 Remove setting to remove items from queue after being marked as played
This action will be done by default.
2021-07-07 13:39:56 +02:00
Swapnil Tripathi 5f25a8607b Reusing FeedDetailsPage to show metadata for podcasts discovery 2021-07-07 12:57:45 +02:00
Swapnil Tripathi 95ee97aefe Expanded the model with more roles and designed frontend. 2021-07-07 12:57:45 +02:00
Tobias Fella fa1c308c2d Add model for searching for podcasts 2021-07-07 12:57:45 +02:00
Swapnil Tripathi 653f41c94e Remove icon from the PlaybackRateDialog. 2021-07-06 20:52:18 +00:00
Swapnil Tripathi 02523e2feb Remove bold text tags. 2021-07-06 20:52:18 +00:00
Swapnil Tripathi 09df795e05 License fix. 2021-07-06 20:52:18 +00:00
Swapnil Tripathi 15e46de814 Minor typo 2021-07-06 20:52:18 +00:00
Swapnil Tripathi 74879a0a58 Fix highlighting of the playbackRate corresponding to the current rate. 2021-07-06 20:52:18 +00:00
Swapnil Tripathi 77715f94b9 Rename Playback.qml -> PlaybackRateDialog.qml 2021-07-06 20:52:18 +00:00
Tobias Fella 2aeb06b5c4 Apply 1 suggestion(s) to 1 file(s) 2021-07-06 20:52:18 +00:00
Swapnil Tripathi 37a7ec6992 Enable clipping 2021-07-06 20:52:18 +00:00
Swapnil Tripathi 32260be05e Remove ScrollView 2021-07-06 20:52:18 +00:00
Swapnil Tripathi fa65447874 Added slowing of playback rate and using OverlaySheet(desktop) and OverlayDrawer(mobile). 2021-07-06 20:52:18 +00:00
Bart De Vries 8cd1237540 Mark another TODO as solved: make a setting for removing played episodes from queue 2021-07-06 22:36:51 +02:00
Bart De Vries 30f694ba09 Add some more settings regarding marking episodes as played 2021-07-06 22:34:26 +02:00
Bart De Vries fe2a977a6b Add setting to automatically delete episodes when they're marked as played
The 3 possibilities are:
0 = Disabled      = Do not delete episodes
1 = Immediately   = Delete immediately
2 = OnNextStartup = Delete on next startup (default)

Fixes #14
2021-07-06 22:34:26 +02:00
Bart De Vries 143ff3a2ed Fix AddFeedSheet battling for focus on startup 2021-07-06 20:33:25 +02:00
Bart De Vries 73b2cf565c Fix recursive loop when last track finishes playing 2021-07-06 19:21:57 +02:00
Bart De Vries f9287e94f8 Fix Accessible onPressed actions 2021-07-06 18:29:26 +02:00
Bart De Vries a5a24fb08c Use transactions to do database migration
This was already implemented for 2 -> 3.
Now also for 1 -> 2.

Additionally, remove unnecessary whitespace in debug statement
2021-07-06 18:29:22 +02:00
Bart De Vries 104cafbd41 Focus text field when adding new podcast + make return key work 2021-07-06 18:29:05 +02:00
Bart De Vries 374a7ef116 Set default page in case lastOpenedPage/getPage cannot be found 2021-07-06 17:04:03 +02:00
Bart De Vries 9731795e62 Solve deadlock in startup between ErrorLogModel and AudioManager 2021-07-06 17:03:25 +02:00
Bart De Vries d2cee8a066 Add error overlay for Invalid Media
This implements a TODO mentioned in the sources.
2021-07-04 16:52:05 +02:00
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
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
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 bd738610bc Small fixes in androidlogging.h 2021-06-19 15:35:56 +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 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
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
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
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
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
Bart De Vries e311a1d1d4 Avoid resizing or re-coloring globaldrawer on mobile 2021-06-04 14:02:28 +02:00
Bart De Vries 05859cdca0 Add missing icon for android build 2021-06-04 09:05:44 +02:00
Swapnil Tripathi 0fd2fca1f1 Updated minimum height and width 2021-06-04 01:30:28 +05:30
Tobias Fella 3f1f3045ec Port away from KDeclarative 2021-06-03 16:23:06 +02:00
Swapnil Tripathi 2145c58333 Added minimum width and height 2021-06-03 15:13:38 +05:30
Swapnil Tripathi 5dc33049de Fix heading text elide. 2021-06-02 21:28:59 +00:00
Bart De Vries a565f6eec1 Disable text wrapping in HeaderBar to avoid nasty binding loops 2021-06-02 22:21:39 +02:00
Mathis Brüchert f49ace47e3 change the sidebar to the normal page background color for contrast reasons 2021-06-02 22:13:54 +02:00
Bart De Vries 974a078e5f Set separate bottom spacing for update and error overlay messages 2021-06-02 22:05:24 +02:00
Bart De Vries 121b4b4d08 Make HeaderBar fixed height instead of a fraction of the window height 2021-06-02 22:05:24 +02:00
Swapnil Tripathi 46568fa131 Set title to a max of 2 lines. 2021-06-02 20:00:18 +00:00
Swapnil Tripathi 617a85925c Added duration labels, fixed header background color and other small fixes. 2021-06-02 20:00:18 +00:00
Swapnil Tripathi 4f02d8676f Desktop mode updated 2021-06-02 20:00:18 +00:00
Swapnil Tripathi 44bb387b54 Added Header Bar 2021-06-02 20:00:18 +00:00
Bart De Vries 7a19e8f288 Fix fallback image if dark theme is used
When using a dark theme, the RSS icon will appear in (nearly) white on a
white background.  Let's fix the icon colour to black to always get the
same fallback image.
2021-06-02 20:49:15 +02:00
Bart De Vries b48270a637 Replace grayed out episode colours by "played" label on delegate 2021-06-01 20:27:43 +02:00
Bart De Vries 9c2d6ecdc0 Align copyright headers with other files in Kasts 2021-06-01 16:47:21 +02:00
Bart De Vries e81b62839a Fix app-crashing binding loop in FeedListPage
The binding loop occured whenever the vertical scrollbar appears or
disappears.  The GUI then gets stuck between solutions: one with a
certain amount of columns and another with one column less or more.  It
then keeps alternating between these two until the app freezes the
machine and eventually crashes.
The fix is to calculate the number of columns based on the total width
of the Page itself, rather than the width of the content.  By
subtracting enough space for the scrollbar, the cards on the page will
now rescale smoothly and properly.
2021-06-01 16:22:03 +02:00
Bart De Vries 4ecbc0597a Switch to introspection dbus interface and add licenses 2021-05-31 20:50:00 +02:00
Bart De Vries 8c620e63ac Remove unnecessary QtMultimedia imports 2021-05-31 11:42:11 +02:00
Bart De Vries eec54d3095 Move feed update action to header on desktop
The refresh buttons currently show up as main action buttons at the
bottom on desktop since they are placed inside SwipeViews/tabs.  Move
these actions to the hierarchical parent ScrollablePages so they end up
in the header bar.
2021-05-31 11:32:46 +02:00
Swapnil Tripathi ea9074ac22 Update EpisodeListPage.qml 2021-05-30 18:25:21 +00:00
Bart De Vries 9d78b5b488 Run clang-format 2021-05-28 23:16:35 +02:00
Bart De Vries 3983e09634 Use qCDebug in AudioManager 2021-05-28 22:55:18 +02:00
Bart De Vries 28b461da07 Consistently capitalize i18n strings 2021-05-28 22:16:14 +02:00
Bart De Vries 9ae93dd064 Properly implement MPRIS Raise() method 2021-05-28 21:51:51 +02:00
Bart De Vries b776dd22cb Contextualize singleShots 2021-05-28 16:54:00 +02:00
Bart De Vries 858601aec3 Change from old style connects to function pointers 2021-05-28 16:49:55 +02:00
Bart De Vries 4d4859a698 Replace AudioManager::timeString by KFormat::formatDuration 2021-05-28 16:42:12 +02:00
Bart De Vries 13b59adb29 Move author into i18nc call 2021-05-28 16:21:47 +02:00
Bart De Vries d45eebf43a Do not push Settings and About to layers stack 2021-05-27 23:29:14 +02:00
Bart De Vries df6a15b160 Remove unused m_audio private member in queuemodel.h 2021-05-27 22:57:08 +02:00
Bart De Vries 370b023a3b Change CMake targets from Qt5::x to Qt::x 2021-05-27 22:46:24 +02:00
Yuri Chornoivan 46916ac2d9 Add i18n() 2021-05-27 18:42:52 +03:00
Mathis Brüchert afce79ce87 make the sidebar less wide 2021-05-27 17:00:56 +02:00
Bart De Vries e78965051c Revert the dependence on wideScreen to avoid app-crashing binding loops 2021-05-27 16:56:15 +02:00
Bart De Vries 04833efa7f Make sure that globaldrawer doesn't disappear on resize 2021-05-25 21:57:01 +02:00
Mathis Brüchert 76fbfa35a4 add header in sidebar 2021-05-25 21:25:14 +02:00
Bart De Vries 99c1424327 Add setting to continue playback after end of current track 2021-05-23 21:35:38 +02:00
Bart De Vries 086e0ef664 Make sure that globalDrawer is not open on mobile on startup 2021-05-23 21:34:37 +02:00
Mathis Brüchert 4342794ac4 Make GlobalDrawer be a sidebar on desktop 2021-05-23 14:07:34 +00:00
Swapnil Tripathi 21e9d0b9a7 Fix segfault when removing feeds with currently playing entries 2021-05-22 09:05:33 +00:00
Bart De Vries 2eb1092f46 Make AudioManager owned and instantiated by c++ 2021-05-20 21:42:13 +02:00
Bart De Vries eab5d08acd Fix database storage bug in ErrorLogModel 2021-05-15 20:31:32 +02:00
Bart De Vries 4e34e76ee0 Replace "feed" by "podcast" 2021-05-12 20:57:56 +02:00
Bart De Vries f1961abe4c Add Accessibility information to ListDelegates 2021-05-12 20:48:54 +02:00
Bart De Vries cce0afd3a0 Add setting to show title overlay on FeedListDelegate images 2021-05-12 20:46:48 +02:00
Bart De Vries 0fc8cca3ef Add missing brackets to if statement body 2021-05-12 13:53:22 +02:00
Tobias Fella 9cbfde6d7c Add more license information 2021-05-12 13:43:49 +02:00
Anubhav Choudhary 79659c99f0 [cli] Added functionality to add feed through command line 2021-05-12 13:25:25 +02:00
Tobias Fella 4b32d7699a Set style for windows 2021-05-12 13:02:55 +02:00
Tobias Fella 55e13ab059 Fix height on resized images 2021-05-12 01:28:41 +02:00
Tobias Fella 6cf133d1d6 Replace "Feed" with "Podcast" in user-visible strings
Should be more understandable
2021-05-11 13:12:38 +02:00
Tobias Fella 3d2d935307 Update description 2021-05-11 12:58:19 +02:00
Bart De Vries dbd108ac44 Make PlayerControls buttons scale properly
Also reworked some of the spacings and alignments of items on
PlayerControls to better make use of the available space and look
consistent across themes/styles (e.g. Material).
2021-05-10 15:32:58 +02:00
Bart De Vries 687c4ec7d0 Solve anchor issue with InlineMessage 2021-05-08 21:09:21 +02:00
Bart De Vries 33b3685413 Visual alignment of elements and whitespace corrections 2021-05-08 19:09:28 +02:00
Bart De Vries a7bac204ad Implement InlineMessage displaying download/update errors 2021-05-08 18:54:29 +02:00
Bart De Vries 506a419aff Update text on FeedDetailsPage to apply to podcasts rather than RSS feeds 2021-05-08 16:24:15 +02:00
Bart De Vries 53cba484fb Only show subtitle in header if it's not empty 2021-05-08 16:20:06 +02:00
Bart De Vries 9c83ee08e8 Show BusyIndicator on newly added feeds until they have finished updating 2021-05-08 16:13:28 +02:00
Bart De Vries 3f4eedb8df Enable setting for automatic feed refreshing on startup 2021-05-07 22:19:14 +02:00
Bart De Vries 236c579bef Enable setting for automatic download of new episodes 2021-05-07 22:19:02 +02:00
Bart De Vries d224eb1b24 Add header to QueuePage with remaining episodes and time 2021-05-07 15:33:39 +02:00
Bart De Vries 1461c7e86c Remove instance() method from AudioManager
AudioManager is currently owned by qml, so it's highly confusing to have
this routine, since it would give a pointer to another instance than the
one owned by qml.
2021-05-07 15:28:14 +02:00
Bart De Vries cfae4a9fa9 Defer resetting the new flag on feeds until everything's been processed
Resetting the flag immediately can lead to situations where all entries
of a new feed are marked as new if the initial feed import gets
interrupted somehow.  E.g. when the user quits the application while
doing an initial import.
2021-05-07 10:26:58 +02:00
Bart De Vries 372f91f4fb Fix mistake: loadPageWithProperties should have been loadPage 2021-05-05 21:56:48 +02:00
Bart De Vries d4d8daa73d Make sure that initialPage is not triggered on every globaldrawer action 2021-05-05 16:58:43 +02:00
Bart De Vries ce360f5ff8 Correct fillMode setting in PlayerControls 2021-05-05 16:57:35 +02:00
Bart De Vries 7e29417db7 Add property to ImageWithFallback to handle image fillMode 2021-05-05 15:56:55 +02:00
Bart De Vries 51b007ce95 Remove settings from Alligator which are not used anymore in Kasts 2021-05-05 15:06:38 +02:00
Bart De Vries 97c3fc6e4d Use ImageWithFallback also in MinimizedPlayerControls and PlayerControls
This leverages re-use of code and simplifies having to define fallbacks
everywhere images are displayed.  It also gets rid of the dependency of
logo.png (which became problematic after the alligator logo was removed
from this repo).
2021-05-05 14:06:33 +02:00
Bart De Vries 8e3a688ddf Don't mark any episodes as new when adding new feeds
Tobias was right; marking one (or more) episodes as "new" on a new feed
doesn't make a lot of sense.  The latest episode from some podcast feeds
can be very old.  Besides, it's quite annoying having a lot of episodes
queued automatically...
2021-05-05 14:04:47 +02:00
Bart De Vries f2efa50b82 Fix build after logo.png was removed 2021-05-05 13:50:35 +02:00
Bart De Vries 1c44e717ae Renaming alligator to kasts everywhere 2021-05-03 22:31:45 +02:00
Bart De Vries dd5e10f973 Fix whitespace and inconsistencies in action text 2021-05-03 16:00:05 +02:00
Bart De Vries 0846dd9d9b Disable DBus as dependency for Android 2021-05-03 12:59:06 +02:00
Bart De Vries fb1516281e Avoid double "Add to queue" actions on EntryPage
Instead of showing "add to queue" as main action and left action, the main
action will show "delete download", leaving "add to queue" as left
action.
This does mean that "delete download" can be main action or right
action, but this is nevertheless an improvement for now...
2021-05-02 15:03:44 +02:00
Bart De Vries 34c5e5309c Implement timeString method to create HH:mm:ss strings from qint64
This method is now used in all places where a HH:mm:ss string is
required.
2021-05-02 09:42:49 +02:00
Bart De Vries 173b86b85d Get rid of downloadStatusChanged in Enclosure
Instead change the signature on statusChanged so it can pass on all
required information instead of needing two signals with separate
signatures.
2021-05-02 09:05:26 +02:00
Bart De Vries c9af45f2ce Change from qmlRegisterSingletonType to qmlRegisterSingletonInstance 2021-05-02 09:04:19 +02:00
Bart De Vries 1b1654d1f4 Apply clang-format 2021-05-01 21:35:37 +02:00
Bart De Vries e774e09f48 Fix missing pre-compiler directives for android in powermanagementinterface 2021-05-01 21:21:09 +02:00
Bart De Vries d1618943f5 Update based on review by Tobias Fella 2021-05-01 21:09:07 +02:00
Bart De Vries 4aa2f14eb7 Apply 50 suggestion(s) to 19 file(s) 2021-05-01 18:59:08 +00:00
Bart De Vries 5a9aa35748 Generate dbus sleep inhbit interfaces from XML 2021-04-30 23:12:22 +02:00
Bart De Vries 6edbd91f18 Set setPreventSleep in play() and pause()
Making it toggle based on the playerState did not work properly because
the stream is toggling between pause and play several times in the
prepareAudioStream method.
2021-04-30 21:45:11 +02:00
Bart De Vries cbf0d9c622 Comment out some qDebug() statements 2021-04-30 19:13:43 +02:00
Bart De Vries 2e777630bc Remove asynchronous loading of Loader in ImageWithFallback 2021-04-30 14:47:13 +02:00
Bart De Vries 8ce5ee0e88 Add dialog-close to icons for Android 2021-04-30 14:46:48 +02:00
Bart De Vries ead73ac2fe Safeguard against QMediaPlayer::InvalidMedia
In case of the InvalidMedia status, skip to next track and delete the
invalid enclosure.
2021-04-30 11:57:39 +02:00