Force metadata resync?

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, xnview

Post Reply
danjcla
Posts: 49
Joined: Fri Feb 13, 2015 12:08 am

Force metadata resync?

Post by danjcla » Fri Feb 13, 2015 12:19 am

I checked the "Export DB Category to XMP subject and IPTC keyword" under:

Settings -> Browser -> Metadata -> IPTC & XMP -> Keywords

However the only way I can get the files to update based on the database categories is to select a category, tag all the files in it, remove that category from all those files, click on another category (so the category removal actually gets processed), then do show tagged files, select all, and add back the category.

Is there some way to force a new from-scratch sync based on the current "Keywords" options?

User avatar
xnview
Author of XnView
Posts: 30667
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Force metadata resync?

Post by xnview » Fri Feb 13, 2015 9:15 am

do you have tried "Update catalog from files"??
Pierre.

danjcla
Posts: 49
Joined: Fri Feb 13, 2015 12:08 am

Re: Force metadata resync?

Post by danjcla » Fri Feb 13, 2015 11:32 pm

I haven't done "Update catalog from files", because I want the files to be updated from the catalog. That is, I want XnView categories to become IPTC and XMP keywords.

I have tried "Update files from catalog". I've seen that not appear to do anything. I've also seen that throw up a progress box that shows a lot of files being gone through. However in both cases none of the files I spot-checked has updated IPTC or XMP metadata.

I tried switching between views and also restarting XnView, still not there. Also files that did not have IPTC resources (sorry, not sure of the correct terminology here) before running "Update files from catalog" still did not have them after; same thing for XMP. I tried giving a bunch of files XMP and IPTC resources - assigning some field in all of them a static value - but that didn't make "Update files from catalog" work. I tried cleaning XMP/IPTC from files first, that also didn't work.

Also I doubt this could even be a bug, but just FYI I spot-check confirmed that the XnView UI was showing the same category stuff as the SQLite database via the below query; everything I looked at was correct.

SELECT Pathname || Filename AS Fullpath, Label
FROM Tags
JOIN TagsTree on TagsTree.TagID = Tags.TagID
JOIN Images on Images.ImageID = TagsTree.ImageID
JOIN Folders on Folders.FolderID = Images.FolderID
ORDER BY Fullpath

(If this is actually a bug I was thinking of using above SQL + shell scripting + some metadata-writing command-line tool as an ugly workaround.)

danjcla
Posts: 49
Joined: Fri Feb 13, 2015 12:08 am

Re: Force metadata resync?

Post by danjcla » Sat Feb 14, 2015 2:02 am

It looks like this bug report may be apropos: http://newsgroup.xnview.com/viewtopic.php?f=62&t=31223

(I'm also on 3.0.72)

CameronD
Posts: 299
Joined: Wed Aug 01, 2007 1:28 pm
Location: Australia

Re: Force metadata resync?

Post by CameronD » Sat Feb 14, 2015 5:41 am

"update files from catalog" creates an XMP sidecar file even if I have specified no sidecars. - [edit] and the sidecar XMP does not reflect the XMP inside the file. For example, there is neither subject nor hierarchical-subject in the sidecar.([another edit]I cannot reproduce this specifically, so I may have been confused. The sidecar has updated category data, but the embedded XMP does not - it retains the original list, which is what XnView MP keep using.)

Is seems that as long as the XMP:hierarchical-subject matches the catalog then XnViewMP does not bother to check the IPTC or XMP:subject values. Other software might not understand the relationship, and therefore they can get out of sync. For example I deleted a "tag" using windows explorer (certainly not my preferred editing process) and it updated IPTC-keyword and XMP-subject, but left hierarchical-subject unchanged.
Last edited by CameronD on Thu Apr 02, 2015 7:45 am, edited 1 time in total.

danjcla
Posts: 49
Joined: Fri Feb 13, 2015 12:08 am

Re: Force metadata resync?

Post by danjcla » Sun Mar 01, 2015 12:57 am

At the guarantee of repeating myself... I'm either doing something really silly or there is a :bug: bug :bug: that only effects a few unlucky people like CameronD and myself.

So I'm giving up on this the file-based to DB-based metadata synchronization altogether; for me it was just going to be part of a workaround to get what would basically be computed categories - but I think I'm going to just say F-it and write computed categories directly to XnViewMP's SQLite DB via an outside script.

I've read elsewhere that having multiple XnView MP instances across a network accessing the same DB shouldn't be a problem for a small number of users, so having a script run periodically shouldn't pose any issues as long as the script itself doesn't do stupid things. And making new category associations to a file looks like really straight forward SQL.

User avatar
xnview
Author of XnView
Posts: 30667
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Force metadata resync?

Post by xnview » Thu Mar 26, 2015 4:24 pm

danjcla wrote:I haven't done "Update catalog from files", because I want the files to be updated from the catalog. That is, I want XnView categories to become IPTC and XMP keywords.

I have tried "Update files from catalog". I've seen that not appear to do anything. I've also seen that throw up a progress box that shows a lot of files being gone through. However in both cases none of the files I spot-checked has updated IPTC or XMP metadata.
Do you have a sample/step to reproduce this problem??
Pierre.

danjcla
Posts: 49
Joined: Fri Feb 13, 2015 12:08 am

Re: Force metadata resync?

Post by danjcla » Sat Mar 28, 2015 4:07 pm

So I've lost interest in this as it was just going to be part of a workaround; but it turns out even if this worked perfectly it wouldn't have worked for my workaround. I recently solved the problems I was having via Fake Features: Uncategorized Search & Strict Search.

However, CameronD is, I believe, still very interested in this. He has a detailed bug report over at v0.72 DB-Category <-> IPTC keyword problems.

Thanks,
-Danny

Post Reply