Add switch to display Podcast image instead of Episode image

Closes #46
This commit is contained in:
Bart De Vries 2024-04-04 19:20:34 +02:00
parent 48a10a25cc
commit 37a8465c7f
4 changed files with 20 additions and 1 deletions

View File

@ -98,6 +98,7 @@ Kirigami.ScrollablePage {
model: page.feed.entries ? page.feed.entries : emptyListModel
delegate: GenericEntryDelegate {
listViewObject: entryList
showFeedImage: false
}
header: ColumnLayout {

View File

@ -26,6 +26,7 @@ AddonDelegates.RoundedItemDelegate {
property bool isQueue: false
property bool isDownloads: false
property bool showFeedImage: !SettingsManager.showEpisodeImage
property QtObject listViewObject: undefined
property bool selected: false
property int row: model ? model.row : -1
@ -195,7 +196,7 @@ AddonDelegates.RoundedItemDelegate {
ImageWithFallback {
id: img
imageSource: entry ? entry.cachedImage : "no-image"
imageSource: entry ? ( showFeedImage ? entry.feed.cachedImage : entry.cachedImage ) : "no-image"
property int size: Kirigami.Units.gridUnit * 3
Layout.preferredHeight: size
Layout.preferredWidth: size

View File

@ -53,6 +53,19 @@ FormCard.FormCardPage {
SettingsManager.save();
}
}
FormCard.FormDelegateSeparator {}
FormCard.FormCheckDelegate {
id: showEpisodeImage
text: i18nc("@option:check", "Show episode image instead of podcast image in lists")
checked: SettingsManager.showEpisodeImage
onToggled: {
SettingsManager.showEpisodeImage = checked;
SettingsManager.save();
}
}
}
FormCard.FormHeader {

View File

@ -35,6 +35,10 @@
<label>Always show the title of podcast feeds in subscription view</label>
<default>false</default>
</entry>
<entry name="showEpisodeImage" type="Bool">
<label>Show the image of the episode rather than the general podcast image</label>
<default>true</default>
</entry>
<entry name="prioritizeStreaming" type="Bool">
<label>Show streaming button instead of download button</label>
<default>false</default>