Skip navigation
Currently Being Moderated

how to make a "new photo to publish" be considered "published" without actually publishing it?

Apr 23, 2012 4:30 AM

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.

 

Any ideas?

 

Rob

 
Replies
  • Currently Being Moderated
    Apr 24, 2012 4:44 PM   in reply to Rob Cole

    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""?

     

    -Don

     


     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2012 12:04 AM   in reply to Rob Cole

    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.

     

    [code]

    catalog:withWriteAccessDo('createcollection', function()

     

         newcollection = v:createPublishedCollection(h.title)

         newcollection:setRemoteId(h.id)

     

    end)

     

    catalog:withWriteAccessDo( 'NPGSetUpdates', function()

        

         newphoto = catalog:addPhoto(newpath)

         newcollection:addPhotoByRemoteId(newphoto,p.id,p.url,true)

     

    end)

     

    [/code]

     

    The biggest thing here is that adding a photo like this requires the code to reside within the withWriteAccessDo block.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points