From 02e92f9a8fe861b52d57001467d9c6f19a64b29f Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Tue, 27 Apr 2021 20:56:24 +0200 Subject: [PATCH] Remove numberNewEpisodes from settings Also clean up the unused allowStreaming setting --- src/fetcher.cpp | 4 ++-- src/qml/SettingsPage.qml | 17 ----------------- src/settingsmanager.kcfg | 8 -------- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/src/fetcher.cpp b/src/fetcher.cpp index 715d1d88..16d83e7f 100644 --- a/src/fetcher.cpp +++ b/src/fetcher.cpp @@ -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); diff --git a/src/qml/SettingsPage.qml b/src/qml/SettingsPage.qml index ec396984..8828f8ad 100644 --- a/src/qml/SettingsPage.qml +++ b/src/qml/SettingsPage.qml @@ -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 }*/ } diff --git a/src/settingsmanager.kcfg b/src/settingsmanager.kcfg index 20f05eca..1d88eb7b 100644 --- a/src/settingsmanager.kcfg +++ b/src/settingsmanager.kcfg @@ -5,10 +5,6 @@ http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > - - - 1 - true @@ -21,10 +17,6 @@ false - - - false - 0