Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

Commit

Permalink
Add logging on photo resolve by path errors
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Shishkin <me@teran.ru>
  • Loading branch information
teran committed Oct 21, 2017
1 parent 5198b55 commit 1741f9b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions deduplicator.lrdevplugin/FindDuplicates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ function FindDuplicates()
for _, file in pairs(photo) do
logger:infof('Preparing query to Lightroom about %s', file)
p = catalog:findPhotoByPath(file)
logger:infof('Preparing to add photo id=%s to collection id=%s', p.localIdentifier, collection.localIdentifier)
collection:addPhotos({p})
if p ~= nil then
logger:infof('Preparing to add photo id=%s to collection id=%s', p.localIdentifier, collection.localIdentifier)
collection:addPhotos({p})
else
logger:warnf('nil result returned on attempt to resolve photo by path %s', file)
end
end
end
end)
Expand Down

0 comments on commit 1741f9b

Please sign in to comment.