From 729c797149e6048e3f48f700e1e4bc2533c3a99d Mon Sep 17 00:00:00 2001
From: Brett Parker <iDunno@sommitrealweird.co.uk>
Date: Thu, 20 Dec 2007 22:13:08 +0000
Subject: [PATCH] * make db key actually unique for feed url + link url

---
 rss2maildir.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rss2maildir.py b/rss2maildir.py
index aaf883f..d721d0e 100755
--- a/rss2maildir.py
+++ b/rss2maildir.py
@@ -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()
 
-- 
2.39.5