I've worked around this by simply rendering stuff out and throwing away the result, to satisfy the publish service.
I'd prefer a call like "setPublishedFlag( Id )", similar to "setEditedFlag".
1 person found this helpful
Could you make use of LrPublishedCollection's
pubCollection:addPhotoByRemoteId( photo, remoteID, remoteUrl, published )
where "published" is defined as "(Boolean) True to mark the photo as "already published", false to mark as "need to publish""?
That looks like it would do it if I can just figure out the pub-collection (sigh) - not sure how to do that just yet...
For now, I think I'll move forward with "render & toss" - the unnecessarily rendered files are small un-edited jpegs so they render pretty quickly.
In one of my plugins I have a requirement to download and add photos from the remote server and populate the newly created published collection in Lightroom. In this routine, I use the following code to add the images to a published collection using the method provided by Don above.
newcollection = v:createPublishedCollection(h.title)
catalog:withWriteAccessDo( 'NPGSetUpdates', function()
newphoto = catalog:addPhoto(newpath)
The biggest thing here is that adding a photo like this requires the code to reside within the withWriteAccessDo block.
I have a "Mark As Published" feature for all my publishing services now. The trick for me has been determining the published collection to add to. In your case, it's the one you just created, but it's not always that simple...