how to make a "new photo to publish" be considered "published" without actually publishing it?
I have some photos that are really just stubs that represent the other "real" photos to publish.
I don't want to have to do a mock export/rendering of them just to make them appear published.
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...