5 Replies Latest reply on Aug 15, 2011 10:01 PM by david.parry

    Synching comments with Lightroom/Smugmug

    jcdill

      I have been in discussions with a developer at Smugmug about a problem I'm having with the Publish module.  When I publish even 1 new photo to Smugmug, the process first publishes the photo, then syncs comments.  Lightroom takes FOREVER to sync comments. 

       

      For example, I have a gallery with 46 photos in it.  It's a private gallery, and the person depicted has left comments on about 1/2 the photos.  I am trying to sync these comments with Lightroom, then remove the photos from Smugmug that have no comments, and then change the gallery to public so she can share it.  I started the sync about 20 minutes ago[1], and the progress bar is less than 25% of the way across.  I only have 3 galleries on Smugmug that were Published from Lightroom at this time, and I'm publishing from a Lightroom catalog that only has the last 6 months of photos in it - not my master catalog that has photos going back to 2000.

       

      There seems to be a very poor method of communication between Lightroom and Smugmug about which photos have new comments on Smugmug.  The Smugmug developer says he is limited in what he can do with the SDK functions he can access.  He writes:

       

      Unfortunately, I am constrained by the LR SDK in many ways and retrieving  comments is one of those cases. Within the method in LR that requests  comments, I have no access to the publish collection that they are  contained in, so there is no way for me to easily grab all the image  comments for a given album. I know how painful this process is, and I  have tried to tackle the problem from a number of different ways. I have  made some requests to the LR development team to improve this, but I  doubt we'll see anything until LR4.

       

      I'm quite concerned about his belief that you won't fix this in the current 3.x release.  Please fix this in 3.x!  IMHO it's a really poor business practice to force users to pay you more money (e.g. to pay for an upgrade) to get a fix for serious usability issues in a current program.  Upgrading should be something users gladly do to get new features, not something users reluctantly do in order to get something fixed that was badly broken in the previous release.  The former has been (until now) Adobe's practice, the later has been seen far more often in Microsoft's practice.  Please don't emulate Microsoft's practice here!!!

       

      jc

       

      [1]  Is there a log file I can look at to determine exactly how long it takes to sync comments?

        • 1. Re: Synching comments with Lightroom/Smugmug
          david.parry

          As the developer in question, I'm adding some additional technical info.

           

          Unlike the majority of other methods related to PublishedCollections in the LR SDK, the method for syncing comments (publishServiceProvider.getCommentsFromPublishedCollection) doesn't actually provide the PublishCollection instance as a function argument.

           

          The method provides an array of PublishedPhotos for the PublishedCollection, but the LR SDK doesn't provide any way to determine PublishedCollection given a PublishedPhoto that is contained within it.

           

          Given that there is no way (that I am aware of) to derive the PublishedCollection that these PublishedPhotos are contained within, I have no option but make a single request to API for each image to retrieve the comments, which could result in hundreds of API calls where I could achieve the same thing with a single API call if I had access to the PublishedCollection object.

          • 2. Re: Synching comments with Lightroom/Smugmug
            johnrellis Most Valuable Participant
            The LR SDK doesn't provide any way to determine PublishedCollection given a PublishedPhoto that is contained within it.

            A couple of months ago someone else encountered the same problem -- can you apply the same solution?  See:

             

            http://forums.adobe.com/thread/810699?decorator=print&displayFullThread=true

            • 3. Re: Synching comments with Lightroom/Smugmug
              johnrellis Most Valuable Participant

              [Oops, hit send too quickly.]

               

              In particular, to build a table mapping from LrPublishedPhoto to LrPublishedCollection:

              catalog:getPublishServices().

               

              - Get the plugin's LrPublishService via

               

              - Enumerate all LrPublishedCollections and LrPublishedCollectionSets in the service via publishService:getChildCollections() and :getChildCollectionSets().

               

              - Enumerate all the LrPublishedPhotos in the published collections via publishedCollection:getPublishedPhotos().

               

              Building this table could be much faster than making hundreds of HTTP API calls to an external service.

              • 4. Re: Synching comments with Lightroom/Smugmug
                johnrellis Most Valuable Participant

                [Ack, my reply got mangled somehow.]

                 

                In particular, to build a table mapping from LrPublishedPhoto to LrPublishedCollection:

                 

                - Get the plugin's LrPublishService via catalog:getPublishServices().

                 

                - Enumerate all LrPublishedCollections and LrPublishedCollectionSets in the service via publishService:getChildCollections() and :getChildCollectionSets().

                 

                - Enumerate all the LrPublishedPhotos in the published collections via publishedCollection:getPublishedPhotos().

                 

                Building this table could be much faster than making hundreds of HTTP API calls to an external service.

                • 5. Re: Synching comments with Lightroom/Smugmug
                  david.parry Level 1

                  G'day John,

                   

                  Thanks for replying to this, as it turns out there is a much easier way to do this....

                   

                  - start iterating over the arrayOfPhotoInfo passed to publishServiceProvider.getCommentsFromPublishedCollection

                  - get the list of PublishedCollections that the PublishedPhoto belongs to using photoInfo.photo:getContainedPublishedCollections()

                  - iterate over the PublishedCollections and retrieve the PublishedPhotos for each PublishedCollection using publishedCollection:getPublishedPhotos()

                  - match the elements of the array against photoInfo.PublishedPhoto

                   

                  Cheers,

                   

                  David