firefox: detect and update changes to titles

This commit is contained in:
blob42 2023-09-09 12:30:28 +02:00
parent 45511ae352
commit 4a42f11cc1
2 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,7 @@ WITH RECURSIVE
folder_marks(bid, type, title, folder, parent)
AS (
SELECT id, type, title, title as folder, parent FROM moz_bookmarks
WHERE fk IS NULL AND parent NOT IN (4,0) AND lastModified > :change_since -- get all folders
WHERE fk IS NULL AND parent NOT IN (4,0) -- get all folders
UNION ALL
SELECT id, moz_bookmarks.type, moz_bookmarks.title, folder, moz_bookmarks.parent -- get all bookmarks with folder parents
FROM moz_bookmarks JOIN folder_marks ON moz_bookmarks.parent=bid

View File

@ -179,6 +179,9 @@ func AddChild(parent *Node, child *Node) {
if child == n {
// log.Errorf("<%s> Node already exists", child)
log.Info(pretty.Sprintf("skipping node <%s>, already exists", child.Name))
// update n with child metadata
log.Debugf("updating node <%s> with metadata <%s>", n.Name, child.Name)
n.Name = child.Name
return
}
}