9 Replies Latest reply on Mar 30, 2017 10:09 AM by johnrellis

    Updating star ratings using SQL

    lestercheung

      Hello fellow Lightroomers,

       

      Not exactly a SDK question but - has anyone tried updating star ratings of their images in the Adobe_images table directly using SQL?

       

      I wrote a little webapp that takes a catalog and the preview cache directory and display a web gallery - I'd like to let people to rate the images and have the rating trickle back into the catalog.

       

      Studying how Lr5 updates the catalog I noticed that the following tables/columns got updated as you rate a photo:

       

      • Adobe_variablesTable: Adobe_entityIDCounter->type
      • Adobe_variablesTable: AgLibraryImageXMPUpdater_WorklistPending->value
      • Adobe_images: rating, sidecarStatus, touchCount and touchTime
      • AgLibraryImageXMPUpdater:

       

      My question is:

       

      If I only care about the rating in the catalog can I simply update the rating column and be happy? Will that break Lightroom in anyway?

       

      Also, if I would like to have the metadata written back to the JPEGs and sidecar files - how do I schedule that?

       

      Any comment will be appreciated!

       

      -les