2 Replies Latest reply on Jan 28, 2016 12:10 PM by flingo

    Lr SDK: publishServiceProvider.getCommentsFromPublishedCollection() - documentation error

    flingo Level 1

      I'm currently working on support for comments to my Publish Service Provider (for Synology's PhotoStation), which is basicly done by the three hooks:

      • publishServiceProvider.getCommentsFromPublishedCollection()
      • publishServiceProvider.addCommentToPublishedPhoto()
      • publishServiceProvider.canAddCommentsToService()

      While the implementation was straight forward, I had a hard time to get the comments being displayed in the comments panel: I could see the number of comments but not the comments themselves. Besides that the system became really unstable and reloading the plugin did not work properly. Instead, I had to restart Lr each time to get code changes be loaded.

       

      I took me some hours until I finally figured out that both the documentation and the Flickr sample were wrong on the use of the comment callback function. Instead of:

      commentCallback { publishedPhoto = photoInfo, comments = commentList }

      it has to be:

      commentCallback( {publishedPhoto = photoInfo, comments = commentList} )

       

      This all happened in Lr 6.3 / Windows 7.

       

      I suspect the documentation and sample code for:

      • publishServiceProvider.getRatingsFromPublishedCollection():

      ratingCallback { publishedPhoto = photoInfo, rating = rating }

      should also be changed to:

      ratingCallback ({ publishedPhoto = photoInfo, rating = rating })

       

      Not yet tested, though.

       

      Can somebody confirm my observation?

       

      Martin