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

1 Vote
LEGEND ,
Mar 20, 2012 Mar 20, 2012

Copy link to clipboard

Copied

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".
Bug Fixed
TOPICS
Desktop

Views

7

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 27, 2012 Apr 27, 2012
This is fixed in LR 4.1 RC2.

Votes

Translate

Translate
3 Comments
Adobe Employee ,
Mar 22, 2012 Mar 22, 2012

Copy link to clipboard

Copied

Yes it appears this call is now returning a "RatioTime." I agree this is a bug. This is fallout from new video functionality in LR4. For backwards compatibility this should return a number, not a RatioTime.

It would be nice to have a "durationInRatioTime" field as well if additional accuracy is required, but as you pointed out it shouldn't be a "RatioTime" object- probably just a table with a denominator and numerator.

I will file and track this issue. Thanks!

Votes

Translate

Translate

Report

Report
LEGEND ,
Mar 22, 2012 Mar 22, 2012

Copy link to clipboard

Copied

Thanks.

Votes

Translate

Translate

Report

Report
LEGEND ,
Apr 27, 2012 Apr 27, 2012

Copy link to clipboard

Copied

LATEST
This is fixed in LR 4.1 RC2.

Votes

Translate

Translate

Report

Report