2008-10-18 Christopher Blizzard <blizzard@0xdeadbeef.com>
authorblizzard <blizzard@ae879524-a8bd-4c4c-a5ea-74d2e5fc5a2c>
Sun, 19 Oct 2008 02:28:05 +0000 (02:28 +0000)
committerblizzard <blizzard@ae879524-a8bd-4c4c-a5ea-74d2e5fc5a2c>
Sun, 19 Oct 2008 02:28:05 +0000 (02:28 +0000)
        * services/command/feedparse.py (FeedUpdateDatabaseCommand.stupidEntryAlreadyThere):
        Since all feeds now generate display_cache data we can use it for
        stupid entires.  Like, say, for old vimeo entries before they had
        a guid.

git-svn-id: svn://trac.whoisi.com/whoisi/trunk@10 ae879524-a8bd-4c4c-a5ea-74d2e5fc5a2c

ChangeLog
services/command/feedparse.py

index 9fffc5e..488d244 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-10-18  Christopher Blizzard  <blizzard@0xdeadbeef.com>
 
+       * services/command/feedparse.py (FeedUpdateDatabaseCommand.stupidEntryAlreadyThere):
+       Since all feeds now generate display_cache data we can use it for
+       stupid entires.  Like, say, for old vimeo entries before they had
+       a guid.
+
+2008-10-18  Christopher Blizzard  <blizzard@0xdeadbeef.com>
+
        * whoisi/templates/vimeo-widget.mak: Widget to render vimeo
        content in person and follow pages.
 
index a81c7fc..6d3881a 100644 (file)
@@ -320,16 +320,15 @@ class FeedUpdateDatabaseCommand(BaseCommand):
         if up:
             updated = datetime(*up)
 
-        # we don't bother checking the display cache since the feed
-        # sources that fill in the display cache all have ids
-        # assoicated with them
+        # Just compare everything in the entry
         for old_entry in results:
             if entry["title"] == old_entry[2] and \
                     entry["link"] == old_entry[3] and \
                     published == old_entry[6] and \
                     updated == old_entry[7] and \
                     entry["summary"] == old_entry[8] and \
-                    self.getBestContent(entry) == old_entry[9]:
+                    self.getBestContent(entry) == old_entry[9] and \
+                    entry["display_cache"] == old_entry[10]:
                 print("  stupid entry already in database: %s" % entry["title"])
                 return True