Otherwise it'll become a so-called automagic dependency with no control
over including support for it or not, other than having it installed on
the system or not.
For LIBVLC CMAKE_DISABLE_FIND_PACKAGE can be used, but for
pkg_check_modules no such things exits and we need an explicit option.
New scalable header bar design which should scale nicely with height
and width changes by collapsing several elements (putting them into
popups and overflow menus). The height scaling of the header is
similar to Elisa, where it will use the regular background color when
fully collapsed.
Titles are clickable and will open the relevant pages. Images are also
clickable and that will open a fullscreen view.
This new design also exposes volume controls both for desktop and mobile
layout.
BUG: 457846
CCBUG: 458331
AudioManager was reporting no connectivity in case the networkstatus was
reported as being "Unknown". We might as well attempt to stream in that
case. If there is no connectivity, it will fail anyway with another
useful error message.
KMediaSession is an audio player library that has an API which is close
to QMediaPlayer and which allows to use --- and dynamically switch
between --- different audio backends. At this moment there is
implementation for libVLC, gstreamer and QtMultimedia. Only QtMultimedia
is a hard dependency in order to at least have one functional backend on
all platforms; all other dependencies are optional.
KMediaSession has out-of-the-box, built-in MPRIS2 support, sleep inhibit,
and basic metadata support.
BUG: 462358
Closes#35
This disables the subscribe button once a feed has been added, i.e. when
the button has been clicked.
Additionally, when clicking on an already subscribed feed on the
discover page will now open the full details including the episode list.
BUG: 458560
This implements support for streaming episodes rather than downloading them
first.
This introduces a new setting: prioritizeStreaming. If it's set to false
(default) then a streaming play button is only added to the EntryPage. If
it is set to true, then the streaming play button will also appear on the
Entry delegates instead of the download button.
There is a separate setting to decide if streaming is also allowed on
metered connections.
FEATURE: 438864
This attempts to fix the issue described here: https://invent.kde.org/plasma-mobile/kasts/-/issues/20
There seemed to be a loop that occurs when setting an img width which causes the view to re-render which causes the window to grow which goes back to setting an img width causing an loop that keeps growing the img width and eventually crashing.
There are a few ways to fix this but I believe not setting a width on an img without a width both fixes it and behaves as expected (see context section). I'm not sure if this is a solution Kasts wants to go with but at the very least it adds more details to the issue.
## Reproducing
The gist of that issue is that a crash occurs when you visit https://feed.zugfunk-podcast.de/podcastrss.xml, episode 53 and this is reproducible.
I was able to get to the bottom of why that particular podcast episode crashes and can be reproduced with the following content
```html
<table style=\"width:30rem;\"><tbody><tr><td style=\"width:14rem;\">Some Text On Left </td><td><img src=\"https://invent.kde.org/plasma-mobile/kasts/-/raw/master/icons/128-apps-kasts.png\"></td></tr></tbody></table>
```
*(can repro by setting this string as a QStringLiteral in Entry.cpp, line 64 when the content is first set and then clicking on any episode)
## Context
The problem seems to be with `<img`s that don't have a width set. In those cases the code tries to set the image to the width of the component. The problem with this seems to be that this assumes that these images are on their own horizontal line and that they should take the whole width. So to repro (see content I used to repro above as an example):
* put an image tag next to some element that takes some width (like a table where there's a left column with some text and a right column in the right)
* img tag without a width
What ends up happening is that the `img width` gets updated to the size of the component width but because there's another element to the left of it, it will mean that the resulting view is bigger than the component width which causes `onWidthChanged`(`EntryPage.qml::88`) to be triggered and the `adjustedContent` function to be called again where this whole process happens again (img width is updated to component width -> rendered but it's larger than width -> causing onWidthChanged -> adjustedContent runs again -> rinse/repeat).
There are other ways to try to solve this but the three I looked at are:
1. After `adjustedContent` is run, it should update the actual `m_content` so that the following runs can work off the last text update (this will mean that the problematic `else` wouldn't be run constantly).
* You can do this by setting the content at the end of the function (`setContent(ret);`)
2. Checking for some reasonable width limit (if width > 10000 then width = 10000)
3. Not resizing an image without a width because we're not sure about the intention of the author
* in this case these were small icons for social media that shouldn't be scaled up
* I think we shouldn't scale any images because of the same reason but the PR is conservative and just stops it in the case of a img without a width
For the PR I went with # 3 because the others led to the icons being scaled but it messed up the look of the page.
Closes#20
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 used to be covered by the bottom action buttons, but those have
been removed some time ago. That only left a pull-down as trigger to
update the feeds, which is non-ideal since it's not explained anywhere.
addFeeds would stop if it encountered a url that we already had in the
database instead of continuing with the next one. This bug was
introduced due to refactoring for sync.
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
FolderDialog has issues retrieving the selected folder if that folder
has been selected through xdg-desktop-portal (i.e. flatpaks). Reverting
to FileDialog from QtQuick.Dialogs.
BUG: 443956
The fetch-on-startup would only happen if the metered state was
explicitly set to "No". Hence, when the state is "Unknown" (which will
happen in most cases) no fetching would be done on startup.
The new logic will check for the metered state not being equal to "Yes".
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.
gettext complained that there's another string with the same text but
not plural and that is bad, so add a dummy context to make gettext happy
xgettext: warning: msgid 'Remove Podcast' is used without plural and with plural.
./qml/FeedListDelegate.qml:279: Here is the occurrence without plural.
./qml/FeedListPage.qml:249: Here is the occurrence with plural.
Workaround: If the msgid is a sentence, change the wording of the sentence; otherwise, use contexts for disambiguation.
xgettext: warning: msgid 'Delete Download' is used without plural and with plural.
./qml/GenericEntryDelegate.qml:294: Here is the occurrence without plural.
./qml/GenericEntryListView.qml:207: Here is the occurrence with plural.
Workaround: If the msgid is a sentence, change the wording of the sentence; otherwise, use contexts for disambiguation.
This adds "select all", "deselect all" to the page contextual actions
and adds "show podcast info" to the OverlayPage opened by clicking on
the overflow menu button on the cards.
This also adds correct use of plurals for the actions if more than one
item has been selected.
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
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