-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Live Photo enabled / disabled database entry? #1513
Comments
I used the Live Video on: Live Video off: When Live Video turned back on: 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. |
You can access these in OSXPhotos using the following: Find live photos with live mode turned off:
Find live photos with live mode turned on:
|
By the way, you cannot open the WAL file. You copy the Photos.sqlite and the associated -shm and -wal files somewhere then open the SQLite file. The DB viewer should open this in a way that the SQLite engine sees the WAL and reads it. |
Thank you, it worked. According to Google you are the only person on this planet to understand Photo's database structure (besides Apple's employees) I modified my copy of osxphoto to add this database line as a new property. My goal was to remove the .mov files associated to these photos. That's no so simple because does not behave well after deletion, and since it is risky to modify the database directly I'll have to export ans re-import the photos. Also, I have an old macOS so I cannot use the new feature "duplicate as still image". I think I will use an AppleScript to create an album in which to put these photos, export the photos with osxphotos to keep all EXIF data, manually delete the photos using Photos, and then re-import only the .HEIC files. |
I have a feature planned to do this sort of thing and other transformations on the photos: #909
Take a look at strip_live.py in the examples folder. It might be sufficient for your needs. It works on currently selected photos so you might still need a script to put all the photos that are live but have the live video disabled into a album: Using your modified version of osxphotos, you could do something like this (this assumes the new property is (Not tested but this should get you started assuming you are familiar with python) import osxphotos
photosdb = osxphotos.PhotosDB()
live_disabled_photos = [p for p in photosdb.photos() if p.live_photo and not p.live_enabled]
album = osxphotos.PhotosAlbum("live_disabled")
album.add_list(live_disabled_photos) |
Thanks again! It totally works! Thus I modified your example script this way:
|
Great, glad it worked! |
Dear devs,
I’d like to know where Photos stores the attribute “enable Live Photo” for each photo.
I have tried comparing two copies of the database using
osxphotos
after manually switching this property for a specific photo inside Photos (right-click->disable Live Photo), but it seems that this attribute isn’t stored in the PhotoInfo object (I have made a side-by-side comparison of the values of the _info dict for my photo identified by its UUID)question1: does anybody knows where that property is stored in Photos.sqlite?
I have also tried comparing the Photos.sqlite databases but the problem is that recent changes are stored in the WAL file (Photos.sqlite-wal) and I am unable to open this file with my favorite SQL inspector App (SQLiteStudio).
question2: Is there a way to force Photos to commit recent changes to the database?
thank you.
The text was updated successfully, but these errors were encountered: