flingo64 / PhotoStation-Upload-Lr-Plugin

Photo StatLr (aka PhotoStation Upload) is a Lightroom Publish and Export Service Plugin that enables the export /publishing of photos and videos from Lr to a Synology Photo Station. It uploads the photos/videos and all required thumbnails. It can download comments and ratings and do a real two-way synch of various metadata (tags, ratings, labels).
http://messmer-online.de/index.php/software/11-photo-statlr
GNU General Public License v3.0
209 stars 21 forks source link

Update PSExiftoolAPI.lua #53

Closed besule closed 3 years ago

besule commented 3 years ago

Hi,

first i would like to say thank you for your plugin, it is really great. I came up an exception. I have some photos where the 'photoDimension.orient' is nil. So a check if the 'photoDimension.orient' is nill would make sense. At first i wanted to remove the whole branch of the if, but you definatly need it, or otherwise the exception occurs in the other branches of the if statement.

i put the isempty function above, since i have no idea, where you would want to put thoes simple helper functions.

flingo64 commented 3 years ago

Thnx for the patch! Checking the photoDimension.orient against nil makes sense. There is a helper function: ifnil(value, default) defined in PSUtils.lua. So, I would suggest to change line 296: photoDimension.orient = ifnil(results[1].Orientation, 'Horizontal')

besule commented 3 years ago

You are absolutly right, i did not see that. I had to export about 45000 images over the weekand and was in a hurry to fix this line :-).