Skip to content

Commit

Permalink
- rss: read multiple conf files
Browse files Browse the repository at this point in the history
Signed-off-by: GetAway <get-away@t-online.de>
  • Loading branch information
svenhoefer authored and GetAway1 committed Feb 12, 2022
1 parent 1efdfce commit 8d714c7
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions plugins/rss/rss.lua
Expand Up @@ -1814,8 +1814,19 @@ function start()
end

function main()
local config= CONF_PATH .. "/rssreader.conf"
if fh:exist(config, "f") == false and fh:exist(config, "l") == false then
local configs = {"rssreader.conf", "media_one.conf"}
local f = {}
for i, v in ipairs(configs) do
local config = CONF_PATH .. v
if fh:exist(config, "f") or fh:exist(config, "l") then
dofile(config)
for j, w in ipairs(feedentries) do
table.insert(f, w)
end
end
end
feedentries = f
if not next(feedentries) then
feedentries = {
{ name = "rssreader.conf Beispiel", exec = "SEPARATORLINE" },
{ name = "heise.de", exec = "https://www.heise.de/newsticker/heise-atom.xml",addon="heise", submenu="TechNews"},
Expand All @@ -1827,9 +1838,8 @@ function main()
{ name = "TecTime TV", exec = "https://www.youtube.com/feeds/videos.xml?user=DrDishTelevision", submenu="Youtube", addon="yt" },
{ name = "KingOfSat News", exec = "http://de.kingofsat.net/rssnews.php",submenu="SatInfo",addon="kingofsat"},
}
else
dofile(config)
end

fh:mkdir(picdir)

LoadMediatheken()
Expand Down

0 comments on commit 8d714c7

Please sign in to comment.