D15357: [Bookmarks Runner] Remove duplicate results for bookmarks

Stefan BrĂ¼ns noreply at phabricator.kde.org
Sat Sep 8 20:55:56 BST 2018


bruns created this revision.
bruns added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
bruns requested review of this revision.

REVISION SUMMARY
  An entry from the moz_places db may have several referring entries
  in the moz_bookmarks db, i.e. where moz_places.id = moz_bookmarks.fk.
  One of these entries is the "main" entry, while the other ones are used
  for tags. Only the main entry has a title, while the others have not.
  The tag entries have the same type as the main entry, even the parents
  have the same type (folder).
  
  Another source for duplicate URLs are manually created bookmarks, e.g.
  in different folders. These may have the same or different titles.
  
  To remove these duplicates, merge all entries with the same URL. If a
  URL has multiple entries, keep all with distinct titles, otherwise keep
  at least one - a bookmark may have an empty title.
  
  See also T9626 <https://phabricator.kde.org/T9626>

TEST PLAN
  - Create a bookmark
  - Add one or more tags
  - Open FFs bookmarks sidebar
  - Copy and paste the new entry
  - Copy and paste the new entry again, change its title
  
  Search for the new bookmark. It should appear exactly twice, once
  with the original title, once with the modified one.
  Without patch, it appears 3 times, plus once more for each tag.
  
  Caveat: The bookmarks db has to be checkpointed to make the new
  entries visible in the main DB file.  To force checkpointing, execute:
  $> sqlite3 -column -header  ~/.mozilla/firefox/*.default/places.sqlite "PRAGMA wal_checkpoint"

REPOSITORY
  R120 Plasma Workspace

BRANCH
  T9626

REVISION DETAIL
  https://phabricator.kde.org/D15357

AFFECTED FILES
  runners/bookmarks/browsers/firefox.cpp

To: bruns, #plasma
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180908/c6b50fdb/attachment-0001.html>


More information about the Plasma-devel mailing list