1 person found this helpful
I do something like this. It may be overkill for your purposes, but at least you can inspect the various tables and determine the pieces you need.
-- Get all the publish service names for this plugin in this catalogue. local pubServices = LrApp.activeCatalog():getPublishServices(_PLUGIN.id) -- From this list of services, get a ref to the current one (which we know from the -- publish settings). local thisServiceName = publishSettings.LR_publish_connectionName --logger:trace("This service name: ", thisServiceName) local thisService = nil for _, service in pairs(pubServices) do --logger:tracef("Found service %s (%s)", service:getName(), service.localIdentifier) -- NOTE: we assume this is not terribly brittle. if service:getName() == thisServiceName then -- We found our current service instance. Save it and bail out of the loop. thisService = service break end end
Thanks for posting this! Unfortunately, in my case anyway, the publishSettings table passed into the callback does not contain the LR_publish_connectionName property (this is really all I'm looking for in the first place, I think).
Huh. I think that is a bug in the SDK, then.
Try dumping the contents of the property table and see what is there.