]> git.phdru.name Git - bookmarks_db.git/blobdiff - Storage/bkmk_stjson.py
Adapted to different Mozilla place URIs.
[bookmarks_db.git] / Storage / bkmk_stjson.py
index 5d34d165f6cb27fae1a4fe4f7ee9a874719dc79d..ede71f38502aeba7314cabe05a44ce6d2a6586bc 100644 (file)
@@ -75,12 +75,23 @@ class storage_json(Walker):
         dict["type"] = "text/x-moz-place"
         dict["uri"] = uri = b.href
         if uri.startswith('place:'):
-            if uri.startswith('place:sort=8'):
+            if uri.startswith('place:sort=8') \
+                    or uri.startswith('place://sort=8'):
                 value = 'MostVisited'
-            elif uri.startswith('place:folder=BOOKMARKS_MENU'):
+            elif uri.startswith('place://redirectsMode'):
+                value = 'Most Visited'
+            elif uri.startswith('place:folder=BOOKMARKS_MENU') \
+                    or uri.startswith('place://folder=BOOKMARKS_MENU'):
                 value = 'RecentlyBookmarked'
-            elif uri.startswith('place:sort=14'):
+            elif uri.startswith('place://folder'):
+                value = 'Recently Bookmarked'
+            elif uri.startswith('place:sort=14') \
+                    or uri.startswith('place://sort=14'):
                 value = 'RecentTags'
+            elif uri.startswith('place://type'):
+                value = 'Recent Tags'
+            else:
+                raise ValueError('UNKNOWN place URI: %s' % uri)
             dict["annos"] = make_annos(value, name='Places/SmartBookmark')
             del dict["dateAdded"]
             del dict["lastModified"]