From b8428744dea09ae6a9167eda3689e93cc335197c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 28 Dec 2011 16:17:44 +0000 Subject: [PATCH] Places, dammit. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@357 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- Storage/bkmk_stjson.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/Storage/bkmk_stjson.py b/Storage/bkmk_stjson.py index 1a7ee16..7ba5f69 100644 --- a/Storage/bkmk_stjson.py +++ b/Storage/bkmk_stjson.py @@ -75,20 +75,13 @@ 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') \ - or uri.startswith('place://sort=8'): - value = 'MostVisited' - 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://folder'): + if 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'): + elif uri.startswith('place:sort=8') or \ + uri.startswith('place:redirectsMode'): + value = 'Most Visited' + elif uri.startswith('place:sort=14') or \ + uri.startswith('place:type=6'): value = 'Recent Tags' else: raise ValueError('UNKNOWN place URI: %s' % uri) -- 2.39.2