Add option to show podcast title on entry delegates

This commit is contained in:
Bart De Vries 2024-04-05 13:47:03 +02:00
parent 37a8465c7f
commit b1934e0601
4 changed files with 20 additions and 1 deletions

View File

@ -98,7 +98,10 @@ Kirigami.ScrollablePage {
model: page.feed.entries ? page.feed.entries : emptyListModel
delegate: GenericEntryDelegate {
listViewObject: entryList
// no need to show the podcast image or title on every delegate
// because we're looking at only one podcast right now
showFeedImage: false
showFeedTitle: false
}
header: ColumnLayout {

View File

@ -27,6 +27,7 @@ AddonDelegates.RoundedItemDelegate {
property bool isQueue: false
property bool isDownloads: false
property bool showFeedImage: !SettingsManager.showEpisodeImage
property bool showFeedTitle: SettingsManager.showPodcastTitle
property QtObject listViewObject: undefined
property bool selected: false
property int row: model ? model.row : -1
@ -245,7 +246,7 @@ AddonDelegates.RoundedItemDelegate {
}
Controls.Label {
id: supertitle
text: entry ? (((!isQueue && entry.queueStatus) || entry.favorite ? "· " : "") + entry.updated.toLocaleDateString(Qt.locale(), Locale.NarrowFormat) + (entry.enclosure ? ( entry.enclosure.size !== 0 ? " · " + entry.enclosure.formattedSize : "") : "" )) : ""
text: entry ? (((!isQueue && entry.queueStatus) || entry.favorite ? "· " : "") + entry.updated.toLocaleDateString(Qt.locale(), Locale.NarrowFormat) + (entry.enclosure ? ( entry.enclosure.size !== 0 ? " · " + entry.enclosure.formattedSize : "") : "" ) + ((entry.feed && showFeedTitle) ? " · " + entry.feed.name : "")) : ""
Layout.fillWidth: true
elide: Text.ElideRight
font: Kirigami.Theme.smallFont

View File

@ -66,6 +66,17 @@ FormCard.FormCardPage {
}
}
FormCard.FormDelegateSeparator {}
FormCard.FormCheckDelegate {
id: showPodcastTitle
text: i18nc("@option:check", "Show podcast titles in episode lists")
checked: SettingsManager.showPodcastTitle
onToggled: {
SettingsManager.showPodcastTitle = checked;
SettingsManager.save();
}
}
}
FormCard.FormHeader {

View File

@ -39,6 +39,10 @@
<label>Show the image of the episode rather than the general podcast image</label>
<default>true</default>
</entry>
<entry name="showPodcastTitle" type="Bool">
<label>Show the podcast/feed title on the entry delegate</label>
<default>false</default>
</entry>
<entry name="prioritizeStreaming" type="Bool">
<label>Show streaming button instead of download button</label>
<default>false</default>