Enable setting for automatic download of new episodes

This commit is contained in:
Bart De Vries 2021-05-07 22:09:15 +02:00
parent d224eb1b24
commit 236c579bef
2 changed files with 3 additions and 5 deletions

View File

@ -69,7 +69,7 @@ DataManager::DataManager()
QString id = query.value(QStringLiteral("id")).toString(); QString id = query.value(QStringLiteral("id")).toString();
addToQueue(feedurl, id); addToQueue(feedurl, id);
if (SettingsManager::self()->autoDownload()) { if (SettingsManager::self()->autoDownload()) {
if (getEntry(id)->hasEnclosure()) { if (getEntry(id) && getEntry(id)->hasEnclosure() && getEntry(id)->enclosure()) {
qDebug() << "Start downloading" << getEntry(id)->title(); qDebug() << "Start downloading" << getEntry(id)->title();
getEntry(id)->enclosure()->download(); getEntry(id)->enclosure()->download();
} }

View File

@ -38,15 +38,14 @@ Kirigami.ScrollablePage {
} }
} }
// TODO: implement this Controls.CheckBox {
/*Controls.CheckBox {
id: autoDownload id: autoDownload
checked: SettingsManager.autoDownload checked: SettingsManager.autoDownload
text: i18n("Automatically download new episodes") text: i18n("Automatically download new episodes")
enabled: autoQueue.checked enabled: autoQueue.checked
onToggled: SettingsManager.autoDownload = checked onToggled: SettingsManager.autoDownload = checked
}*/ }
Kirigami.Heading { Kirigami.Heading {
Kirigami.FormData.isSection: true Kirigami.FormData.isSection: true
@ -63,7 +62,6 @@ Kirigami.ScrollablePage {
to: 20 to: 20
onValueModified: SettingsManager.articleFontSize = value onValueModified: SettingsManager.articleFontSize = value
} }
Controls.CheckBox { Controls.CheckBox {