diff --git a/rcgcdw.py b/rcgcdw.py index 7ead059..83b373c 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -681,7 +681,7 @@ class recent_changes_class(object): def add_cache(self, change): self.ids.append(change["rcid"]) #self.recent_id = change["rcid"] - if len(self.ids) > settings["limit"]+5: + if len(self.ids) > settings["limitrefetch"]+5: self.ids.pop(0) def fetch(self, amount=settings["limit"]): @@ -736,8 +736,11 @@ class recent_changes_class(object): self.streak = -1 send(_("Connection to {wiki} seems to be stable now.").format(wiki=settings["wikiname"]), _("Connection status"), settings["avatars"]["connection_restored"]) for change in changes: - if change["rcid"] in self.ids: + if change["rcid"] in self.ids or change["rcid"] < self.recent_id: + logging.debug("Change ({}) is in ids or is lower than recent_id {}".format(change["rcid"], self.recent_id)) continue + logging.debug(self.ids) + logging.debug(self.recent_id) self.add_cache(change) if clean and not (self.recent_id == 0 and change["rcid"] > self.file_id): logging.debug("Rejected {val}".format(val=change["rcid"])) diff --git a/settings.json.example b/settings.json.example index 3fb1af4..5592bf0 100644 --- a/settings.json.example +++ b/settings.json.example @@ -46,11 +46,11 @@ "color":null }, "delete/delete":{ - "icon":"https://i.imgur.com/C4H84Kp.jpg", + "icon":"https://i.imgur.com/BU77GD3.png", "color":1 }, "delete/delete_redir":{ - "icon":"https://i.imgur.com/C4H84Kp.jpg", + "icon":"https://i.imgur.com/BU77GD3.png", "color":1 }, "delete/restore":{