iter through rss entries backwards
This commit is contained in:
parent
be9ae33880
commit
e88f23e413
1 changed files with 3 additions and 3 deletions
|
@ -51,13 +51,13 @@ class Module(ModuleManager.BaseModule):
|
||||||
for channel in channels:
|
for channel in channels:
|
||||||
seen_ids = channel.get_setting("rss-seen-ids", [])
|
seen_ids = channel.get_setting("rss-seen-ids", [])
|
||||||
new_ids = []
|
new_ids = []
|
||||||
valid = 1
|
valid = 0
|
||||||
for entry in feed["entries"]:
|
for entry in feed["entries"][::-1]:
|
||||||
if entry["id"] in seen_ids:
|
if entry["id"] in seen_ids:
|
||||||
new_ids.append(entry["id"])
|
new_ids.append(entry["id"])
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if valid == 4:
|
if valid == 3:
|
||||||
continue
|
continue
|
||||||
valid += 1
|
valid += 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue