iter through rss entries backwards

This commit is contained in:
jesopo 2019-06-23 16:22:45 +01:00
parent be9ae33880
commit e88f23e413

View file

@ -51,13 +51,13 @@ class Module(ModuleManager.BaseModule):
for channel in channels:
seen_ids = channel.get_setting("rss-seen-ids", [])
new_ids = []
valid = 1
for entry in feed["entries"]:
valid = 0
for entry in feed["entries"][::-1]:
if entry["id"] in seen_ids:
new_ids.append(entry["id"])
continue
if valid == 4:
if valid == 3:
continue
valid += 1