From 456e31a3585cf3c209f5044f437526f221ba1fa9 Mon Sep 17 00:00:00 2001 From: mwoz123 Date: Sun, 29 Oct 2017 22:23:08 +0100 Subject: [PATCH] NewsDownloader: Compatibility for users with previous configuration files (#3445) --- plugins/newsdownloader.koplugin/feed_config.lua | 6 +++--- plugins/newsdownloader.koplugin/main.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/newsdownloader.koplugin/feed_config.lua b/plugins/newsdownloader.koplugin/feed_config.lua index 2b4d2a993..6d3b643c1 100644 --- a/plugins/newsdownloader.koplugin/feed_config.lua +++ b/plugins/newsdownloader.koplugin/feed_config.lua @@ -1,12 +1,12 @@ return { -- list your feeds here: - { "http://feeds.reuters.com/Reuters/worldNews?format=xml", limit = 2, download_full_article=false}, + { "http://feeds.reuters.com/Reuters/worldNews?format=xml", limit = 2, download_full_article=true}, - { "https://www.pcworld.com/index.rss", limit = 7 , download_full_article=true}, + { "https://www.pcworld.com/index.rss", limit = 7 , download_full_article=false}, -- comment out line ("--" at line start) to stop downloading source - --{ "http://www.football.co.uk/international/rss.xml", limit = 0 , download_full_article=true}, + --{ "http://www.football.co.uk/international/rss.xml", limit = 0 , download_full_article=false}, diff --git a/plugins/newsdownloader.koplugin/main.lua b/plugins/newsdownloader.koplugin/main.lua index 60ca08849..a119183ac 100644 --- a/plugins/newsdownloader.koplugin/main.lua +++ b/plugins/newsdownloader.koplugin/main.lua @@ -170,7 +170,7 @@ function NewsDownloader:loadConfigAndProcessFeeds() for idx, feed in ipairs(feed_config) do local url = feed[1] local limit = feed.limit - local download_full_article = feed.download_full_article + local download_full_article = feed.download_full_article == nil or feed.download_full_article if url and limit then info = InfoMessage:new{ text = T(_("Processing: %1"), url) } UIManager:show(info)