tag => { List => 'Bag', Writable => 'lang-alt' },

Started by herb, August 27, 2019, 04:05:08 AM

Previous topic - Next topic

herb

Hello Phil,

Some days after my previous post I came to following additional question:

(4) Question
Is there a different behaviour of the list whether it is a Seq, Bag or Alt?

Best regards
Herb

Phil Harvey

Hi Herb,

Quote from: herb on September 19, 2019, 06:53:29 AM
(1) Finding 1
exiftool.exe -sep # -xmp-plus:custom1-x-default=x1#x2#x3 -xmp-plus:custom1-de=d1#d2#d3 -xmp-plus:custom1-fr=f1#f2 test.xmp
gives the following error:
Internal error: no list index for Custom1-x-default!

I do not get this error with the attached test.xmp file and the above command.

Quote(2) Finding 2
With the attached file test.xmp I get different output whether using option -struct:

Yes.  ExifTool doesn't generate missing list entries unless the -struct option is used.

Quote(3) Question: How does Exiftool populate the lists
During all my test I could not find out, how Exiftool really creates or modifies lists and populates it with the elements from the commandline.

This really hasn't been tightly defined because up until now nobody has really cared about this.  Most people would write the default and french entries at the same time, and wouldn't notice this quirk.  I can look into explaining/documenting and/or changing this behaviour if it is important to you.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

Quote from: herb on September 23, 2019, 10:38:43 AM
(4) Question
Is there a different behaviour of the list whether it is a Seq, Bag or Alt?

No.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

herb

Hello Phil,

thanks for your comments.

ad (1) Finding 1:
QuoteI do not get this error with the attached test.xmp file and the above command.
Yes, this happens only when the command is used to create the *.xmp file.
Sorry, that I was not clear enough.

ad (3) Question
QuoteI can look into explaining/documenting and/or changing this behaviour if it is important to you.
The main goal is/was to fully understand how Exiftool is working.
And sorry, I have to agree, it would be great when Exiftool would populate existing lists first that allow an element to be added.

Best regards
Herb

Phil Harvey

Quote from: herb on September 25, 2019, 01:30:29 PM
Yes, this happens only when the command is used to create the *.xmp file.
Sorry, that I was not clear enough.

Thanks.  I can reproduce this now.  I'll look into this.

Quotead (3) Question
QuoteI can look into explaining/documenting and/or changing this behaviour if it is important to you.
The main goal is/was to fully understand how Exiftool is working.
And sorry, I have to agree, it would be great when Exiftool would populate existing lists first that allow an element to be added.

This is a bit lower priority, but I'll look into this too if I get a chance.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

Quote from: Phil Harvey on September 26, 2019, 07:10:38 AM
Quote from: herb on September 25, 2019, 01:30:29 PM
Yes, this happens only when the command is used to create the *.xmp file.
Sorry, that I was not clear enough.

Thanks.  I can reproduce this now.  I'll look into this.

I forgot to post back here, but this was fixed in ExifTool 11.66.

Thanks for the report.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).