From e3f2c11fc9d73e35d2a05a489090dbdb879c471e Mon Sep 17 00:00:00 2001 From: lifegpc Date: Thu, 7 Jan 2021 14:21:37 +0800 Subject: [PATCH] minor update --- RSSEntry.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/RSSEntry.py b/RSSEntry.py index 872af4c..8690e7a 100644 --- a/RSSEntry.py +++ b/RSSEntry.py @@ -71,9 +71,16 @@ class HashEntries: def add(self, d: HashEntry): if d.hash is not None and d.id is not None: + o = None for v in self.__list: if v.hash == d.hash and v.id == d.id: - return + if d.time > v.time: + o = v + break + else: + return + if o is not None: + self.__list.remove(o) self.__list.append(d) self.__removeMax()