Remove numberNewEpisodes from settings

Also clean up the unused allowStreaming setting
This commit is contained in:
Bart De Vries 2021-04-27 20:56:24 +02:00
parent 6938b331c3
commit 02e92f9a8f
3 changed files with 2 additions and 27 deletions

View File

@ -202,11 +202,11 @@ void Fetcher::processFeed(Syndication::FeedPtr feed, const QString &url)
if (isNewFeed) {
query.prepare(QStringLiteral("SELECT * FROM Entries WHERE feed=:feed ORDER BY updated DESC LIMIT :recentNew;"));
query.bindValue(QStringLiteral(":feed"), url);
query.bindValue(QStringLiteral(":recentNew"), SettingsManager::self()->numberNewEpisodes());
query.bindValue(QStringLiteral(":recentNew"), 1); // hardcode to marking one episode as new
Database::instance().execute(query);
QSqlQuery updateQuery;
while (query.next()) {
qDebug() << "Marked as new:" << query.value(QStringLiteral("id")).toString();
//qDebug() << "Marked as new:" << query.value(QStringLiteral("id")).toString();
updateQuery.prepare(QStringLiteral("UPDATE Entries SET read=:read, new=:new WHERE id=:id AND feed=:feed;"));
updateQuery.bindValue(QStringLiteral(":read"), false);
updateQuery.bindValue(QStringLiteral(":new"), true);

View File

@ -24,15 +24,6 @@ Kirigami.ScrollablePage {
text: i18n("Queue Settings")
}
Controls.SpinBox {
id: numberNewEpisodes
Kirigami.FormData.label: i18n("# of episodes to label as new when adding a new subscription:")
value: SettingsManager.numberNewEpisodes
onValueModified: SettingsManager.numberNewEpisodes = value
}
Controls.CheckBox {
id: autoQueue
checked: SettingsManager.autoQueue
@ -54,14 +45,6 @@ Kirigami.ScrollablePage {
enabled: autoQueue.checked
onToggled: SettingsManager.autoDownload = checked
}
Controls.CheckBox {
id: allowStreaming
checked: SettingsManager.allowStreaming
text: i18n("Allow streaming of audio")
onToggled: SettingsManager.allowStreaming = checked
}*/
}

View File

@ -5,10 +5,6 @@
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="alligatorrc" />
<group name="General">
<entry name="numberNewEpisodes" type="Int">
<label>How many recent episodes should be labeled 'new' when adding a new subscription</label>
<default>1</default>
</entry>
<entry name="autoQueue" type="Bool">
<label>Automatically add new episodes to queue</label>
<default>true</default>
@ -21,10 +17,6 @@
<label>Automatically download new episodes</label>
<default>false</default>
</entry>
<entry name="allowStreaming" type="Bool">
<label>Allow streaming of audio</label>
<default>false</default>
</entry>
<entry name="deleteAfterCount" type="Int">
<label>Delete after count</label>
<default>0</default>