iOS Live Photo linking script #15697
JacobBumgarner
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I wanted to share a utility script I made to automate the process of linking iOS Live Photos to their Live Video counterparts. The script was written in Python and uses the Immich API link the identified assets.
Background
When I originally imported my iOS
.photoslibrary
to Immich using the Immich CLI, several thousand of my Live Photos weren't linked to their Live Video assets correctly. I think this was a result of my.photoslibrary
being about a decade old and having gone through multiple macOS updates.Because I had several thousands photos that needed linked, I decided to create a utility script to automate this process. The script can be cloned from my repo below.
Linking Script
GitHub Repo:
https://github.com/JacobBumgarner/immich-live-photo-linker
The script has several safe-guard features and leaves a trail that allows the actions to be reverted by a separate script. Instructions can be seen in the repo's
README
.Example usage for reference:
Here is an example of the full run I ran on my Immich data base:
Once this is done, a timestamped
csv
file of the linked assets will be produced. In the instance of linking issues, you can use this audit file to revert the asset links via:Info
I wrote this script such that it may be of use to others in the community facing the same issue. Of course, use the script at your own risk, and make sure you have a data base backup in case anything goes wrong.
Beta Was this translation helpful? Give feedback.
All reactions