I'm reading .lrcat data using a python script and sqlite3. I have a column in the Adobe_AdditionalMetadata table called xmp with an odd encoding, probably an Adobe Lightroom encoding. Here's my chunk of code:
from libxmp import XMPFiles
cursor = conn.execute('SELECT xmp FROM Adobe_AdditionalMetadata')
row = cursor.fetchone()
xmp_data = row[0]
xmp_data.decode('utf-8')
I tried some .decode('utf-8') or trying to convert the byte to string but didn't work. I know there's the exiftool but I dont see any ways to decode the xmp_data. Apparently, it helps reading xmp files but not the data in the catalog... Any ideas of what i could try? Something with LR API's maybe?