Lightroom SDK: Bug in photo:getRawMetadata ("durationInSeconds")?

  • 1
  • Problem
  • Updated 6 years ago
  • Solved
  • (Edited)
In LR 3, the field "durationInSeconds" returned by photo:getRawMetadata() is a number. But in LR 4, it's a userdata that tostring() shows as "RatioTime( 1847/6 )". Some tedious experimentation (absent documentation) shows that the method toNumber() will convert it to a number.

Was it intentional to return this field as a built-in object? I suspect that this is a bug, that the intention was to convert the RatioTime to a number before returning it to the client caller. All other SDK objects have names that start with "Lr".
Photo of John R. Ellis

John R. Ellis, Champion

  • 3724 Posts
  • 974 Reply Likes

Posted 7 years ago

  • 1
Photo of John R. Ellis

John R. Ellis, Champion

  • 3724 Posts
  • 974 Reply Likes
Official Response
This is fixed in LR 4.1 RC2.