Python app to work with pictures and associated metadata from Apple Photos on macOS. Also includes a package to provide programmatic access to the Photos library, pictures, and metadata.
> question1: does anybody knows where that property is stored in Photos.sqlite?
I used the osxphotos snap and osxphotos diff tools (which are hidden -- not listed in the help unless you use OSXPHOTOS_SHOW_HIDDEN=1) to perform a snapshot of the database before and after changing a photo's live photo on/off status which shows:
Live Video on:
ZASSET table:
ZPLAYBACKSTYLE=3, ZVIDEOCPVISIBILITYSTATE=0
Live Video off:
ZASSET table:
ZPLAYBACKSTYLE=1, ZVIDEOCPVISIBILITYSTATE=15
When Live Video turned back on:
ZASSET table:
ZPLAYBACKSTYLE=3, ZVIDEOCPVISIBILITYSTATE=10
These are not currently exposed in OSXPhotos.
question2: Is there a way to force Photos to commit recent changes to the database?
You cannot do this. You need to use a SQLite viewer that understands WAL mode. I like DB Browser for SQLite. I also recommend you ALWAYS copy the Photos.sqlite and the -shm and -wal files before viewing them. You risk corruption if you open them directly from the Photos library.
I used the
osxphotos snap
andosxphotos diff
tools (which are hidden -- not listed in the help unless you useOSXPHOTOS_SHOW_HIDDEN=1
) to perform a snapshot of the database before and after changing a photo's live photo on/off status which shows:Live Video on: ZASSET table: ZPLAYBACKSTYLE=3, ZVIDEOCPVISIBILITYSTATE=0
Live Video off: ZASSET table: ZPLAYBACKSTYLE=1, ZVIDEOCPVISIBILITYSTATE=15
When Live Video turned back on: ZASSET table: ZPLAYBACKSTYLE=3, ZVIDEOCPVISIBILITYSTATE=10
These are not currently exposed in OSXPhotos.
You cannot do this. You need to use a SQLite viewer that understands WAL mode. I like DB Browser for SQLite. I also recommend you ALWAYS copy the Photos.sqlite and the -shm and -wal files before viewing them. You risk corruption if you open them directly from the Photos library.
Originally posted by @RhetTbull in https://github.com/RhetTbull/osxphotos/issues/1513#issuecomment-2054112767