]> git.sommitrealweird.co.uk Git - rss2maildir.git/commitdiff
* make db key actually unique for feed url + link url
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Thu, 20 Dec 2007 22:13:08 +0000 (22:13 +0000)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Thu, 20 Dec 2007 22:13:08 +0000 (22:13 +0000)
rss2maildir.py

index aaf883f81af394f74f64bb2a2271a4a20fcd3c3a..d721d0e49c19994c84b6e6407766e02c836ce5d4 100755 (executable)
@@ -146,8 +146,8 @@ def parse_and_deliver(maildir, url, statedir):
 
         md5sum = md5.md5(content.encode("utf8")).hexdigest()
 
-        if db.has_key(item["link"]):
-            data = db[item["link"]]
+        if db.has_key(url + "|" + item["link"]):
+            data = db[url + "|" + item["link"]]
             data = cgi.parse_qs(data)
             if data["contentmd5"][0] == md5sum:
                 continue
@@ -191,7 +191,7 @@ def parse_and_deliver(maildir, url, statedir):
 
         # now add to the database about the item
         data = urllib.urlencode((("message-id", messageid), ("created", createddate), ("contentmd5", md5sum)))
-        db[item["link"]] = data
+        db[url + "|" + item["link"]] = data
 
     db.close()