Properly queue up tags for old items
authorJack Miller <jack@codezen.org>
Mon, 24 Nov 2014 16:43:41 +0000 (10:43 -0600)
committerJack Miller <jack@codezen.org>
Mon, 24 Nov 2014 17:50:12 +0000 (11:50 -0600)
canto_next/feed.py

index 1b3a387..65f000c 100644 (file)
@@ -382,6 +382,13 @@ class CantoFeed(PluginHandler):
                     log.debug("Discarding: %s", olditem["id"])
                     continue
 
+                cacheitem = self._cacheitem(olditem)
+                tags_to_add.append((cacheitem["id"], "maintag:" + self.name))
+
+                if "canto-tags" in olditem:
+                    for user_tag in olditem["canto-tags"]:
+                        tags_to_add((cacheitem["id"], user_tag))
+
                 update_contents["entries"].append(olditem)
 
         # Allow plugins DaemonFeedPlugins defining edit_* functions to have a