v411e / ppim-migrator

Tool for migrating albums and favorites from photoprism to immich
https://pypi.org/project/ppim-migrator/
21 stars 2 forks source link

Not creating albums - all files found, log says created. #5

Closed ranasats closed 2 weeks ago

ranasats commented 2 weeks ago

migrator version: ppim-migrator in /usr/lib64/python3.9/site-packages (0.0.4) Immich version: [v1.106.4]

Logs from the tool say the following, after giving the proper mapping info:

Migration successful!
All images found in immich: 1311
Creating album...
Done.

However, when going into Immich and looking at Albums, it doesn't have the newly imported album. I tried repeating this 2-3x, but same output from the tool, and immich logs don't show anything at all about it either. Any thoughts? Maybe Immich's version is too new? I'm in the middle of a large import of photos so don't want to downgrade and try that yet.

ranasats commented 2 weeks ago

Ah, looks like I found the breaking change, only looks like the API endpoint changed. currently here it is https://github.com/v411e/ppim-migrator/blob/main/ppim-migrator/api/immich_api.py#L48

url = f"{self.base_url}/api/album" but the new API url is url = f"{self.base_url}/api/albums"

https://immich.app/docs/api/create-album

v411e commented 2 weeks ago

Oh, another breaking change 😅 Thanks for looking into it. I'll create an update next week

elduty commented 2 weeks ago

The same issue for favourites. I created a pull request to solve it - https://github.com/v411e/ppim-migrator/pull/6

ranasats commented 2 weeks ago

Thanks! didn't get around to making a PR, yours fixes it. :)