I recently finalized my first Lr Export plugin and currently I'm working on the Publish Service Provider enhancements for that Export plugin. So far, everything works as expected except one thing::
The publish service provider supports mirroring of local directory structures to the publish destination. So, I am interested in photos being moved from one local directory to a different one, since I have to propagate this change to the destination. Lr informs me whenever a photo/video is changed (acc. to my settings in publishServiceProvider.metadataThatTriggersRepublish()) or deleted, but what about the fact that a photo was moved from local directory a to b?
Any chance to register a trigger for a photo movement?
I don't think there's a way to register for notifications of photos being moved. Perhaps the best you could do is to query the path of every photo in the catalog with catalog:batchGetRawMetadata(). A quickie timing indicates it processes about 5000 photos/sec.
That's an interesting approach, never thought that way round!
It might not be suitable as a general prodedure for every single normal "Publish" action, because if you have e.g. 10 pictures with status "to be re-published" in a collection of 20.000 pics or more you wouldn't expect the Publish plugin to re-check all photo locations. That would make the publish process unacceptable lame and annoy the people.
But if I define it as a publish option ("check for moved photos only"), this would be way to "automatically" find and mark moved photos for "to be re-published".
Well, not exactly what I was hoping for, but a reasonable second best approach.