mirror of https://github.com/KDE/kasts.git
Add some more settings regarding marking episodes as played
This commit is contained in:
parent
fe2a977a6b
commit
30f694ba09
|
@ -148,8 +148,21 @@ void Entry::setRead(bool read)
|
|||
|
||||
// Follow up actions
|
||||
if (read && hasEnclosure()) {
|
||||
// 1) Delete episode if that setting is set
|
||||
if (SettingsManager::self()->autoDelete() == 1) {
|
||||
// 1) Reset play position
|
||||
if (SettingsManager::self()->resetPositionOnPlayed()) {
|
||||
m_enclosure->setPlayPosition(0);
|
||||
}
|
||||
|
||||
// 2) Remove item from queue
|
||||
if (SettingsManager::self()->removeFromQueueOnPlayed()) {
|
||||
setQueueStatus(false);
|
||||
}
|
||||
|
||||
// 3) Remove "new" label
|
||||
setNew(false);
|
||||
|
||||
// 4) Delete episode if that setting is set
|
||||
if (SettingsManager::self()->autoDeleteOnPlayed() == 1) {
|
||||
m_enclosure->deleteFile();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,12 +86,25 @@ Kirigami.ScrollablePage {
|
|||
model: [{"text": i18n("Do Not Delete"), "value": 0},
|
||||
{"text": i18n("Delete Immediately"), "value": 1},
|
||||
{"text": i18n("Delete at Next Startup"), "value": 2}]
|
||||
Component.onCompleted: currentIndex = indexOfValue(SettingsManager.autoDelete)
|
||||
Component.onCompleted: currentIndex = indexOfValue(SettingsManager.autoDeleteOnPlayed)
|
||||
onActivated: {
|
||||
SettingsManager.autoDelete = currentValue;
|
||||
SettingsManager.autoDeleteOnPlayed = currentValue;
|
||||
}
|
||||
}
|
||||
|
||||
Controls.CheckBox {
|
||||
checked: SettingsManager.removeFromQueueOnPlayed
|
||||
text: i18n("Remove from Queue")
|
||||
onToggled: SettingsManager.removeFromQueueOnPlayed = checked
|
||||
}
|
||||
|
||||
Controls.CheckBox {
|
||||
checked: SettingsManager.resetPositionOnPlayed
|
||||
text: i18n("Reset Play Position")
|
||||
onToggled: SettingsManager.resetPositionOnPlayed = checked
|
||||
}
|
||||
|
||||
|
||||
Kirigami.Heading {
|
||||
Kirigami.FormData.isSection: true
|
||||
text: i18n("Network")
|
||||
|
|
|
@ -61,7 +61,7 @@ Kirigami.ApplicationWindow {
|
|||
pageStack.initialPage = getPage(SettingsManager.lastOpenedPage)
|
||||
|
||||
// Delete played enclosures if set in settings
|
||||
if (SettingsManager.autoDelete == 2) {
|
||||
if (SettingsManager.autoDeleteOnPlayed == 2) {
|
||||
DataManager.deletePlayedEnclosures();
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<label>Automatically download new episodes</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="autoDelete" type="Enum">
|
||||
<entry name="autoDeleteOnPlayed" type="Enum">
|
||||
<label>Setting to select if or when to delete played episode</label>
|
||||
<choices>
|
||||
<choice name="Disabled">
|
||||
|
@ -40,6 +40,14 @@
|
|||
</choices>
|
||||
<default>OnNextStartup</default>
|
||||
</entry>
|
||||
<entry name="removeFromQueueOnPlayed" type="Bool">
|
||||
<label>Remove episode from queue when marked as played</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="resetPositionOnPlayed" type="Bool">
|
||||
<label>Reset play position when episode is marked as played</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="toggleRemainingTime" type="Bool">
|
||||
<label>Whether the player shows remaining track time instead of total track time</label>
|
||||
<default>false</default>
|
||||
|
@ -73,4 +81,4 @@
|
|||
<default>FeedListPage</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
||||
</kcfg>
|
Loading…
Reference in New Issue