How to avoid multiple writes when using a metadata template to write keywords

Started by Ferdinand, August 29, 2014, 10:13:25 AM

Previous topic - Next topic

Ferdinand

I have a couple of metadata templates that I'm setting up that write various pieces of metadata (categories, xmp) to @keywords.

The problem I'm finding is that the initial write doesn't also write the flat keywords in line with my metadata settings, and so a second (and sometimes third) writeback is needed.

Is there a way to avoid this when using a metadata template, and write it all correctly the first time?   

Does it matter which keywords field I write to - XMP::Lightroom\hierarchicalSubject or Composite\Keywords?

(This is where my script comes in handy - because it deals with this issue.)

Ferdinand

I'm going to answer my own questions:

Don't write to Composite\Keywords, as this will write the hierarchical keyword to both the hierarchical keyword field and the flay keyword field, and in my experiments it took a further two rounds of metadata writebacks (for a total of three) to clean this up and put the correct flat keywords into the flat keyword fields.

Do write to XMP::Lightroom\hierarchicalSubject, as this only writes to this field, and only requires one further round of writebacks to insert the correct flat keywords into the flat keyword fields.

You can avoid the second round of writebacks if your metadata template writes the correct information to XMP::dc\Subject. 

But the code to get this right may be simple or may be complex, depending on your settings and what it is you're trying to write (XMP fields or keywords).