photools.com Community

IMatch Discussion Boards => IMatch Scripting and Apps => Topic started by: philippe28 on August 09, 2017, 09:57:36 PM

Title: IMWS.post('V1/metadata',postData)
Post by: philippe28 on August 09, 2017, 09:57:36 PM
Playing around metadata (Master -> Version), I can set the tags I need so far (thanks to the numerous examples provided by Mario), except XMP::xmpRights\Marked for which I've not found a shortcode.
Is there a way to read/write this tag ?

Just a remark: I've also noticed that for gps data, altitude doesn't behave as latitude and longitude. The last two ones require the parameter rawvalue: true as indicated in Code Recipes but not the first one.
Edit2: If the source latitude is not defined it is read as 0. Is there a way to detect this situation ? What should be the value to enter to set it as not defined (Null doesn't work) ?

Thanks
Philippe
Title: Re: IMWS.post('V1/metadata',postData)
Post by: thrinn on August 09, 2017, 10:27:02 PM
Hello Philippe,
try

IMWS.post("v1/metadata", {
  tasks: JSON.stringify([
    {
      "id": 6,
      "tag": "XMP::xmpRights\\Marked\\Marked\\0",
      "op": "set",
      "value": true
    }
  ])
})

This works for me.
I used the Vartoy app to find the correct tag name. You do not have to use a shortcode, it only makes life easier a bit. But if there is none, the tag itself works also. Just remember to double the backslashes...
Title: Re: IMWS.post('V1/metadata',postData)
Post by: philippe28 on August 10, 2017, 06:26:21 PM
Hi Thorsten,
that works fine ! Both for reading and writing.
Thank you for the tips !
Philippe