Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating stacks by updating the stacked assets is no longer supported #478

Open
m-georgi opened this issue Sep 7, 2024 · 3 comments
Open
Assignees

Comments

@m-georgi
Copy link

m-georgi commented Sep 7, 2024

Up to version 0.112 of immich it was possible to create stacks by updating the stacked assets using the /assets endpoint and providing a stackParendId of the asset that should be used as the stack cover.

Starting with 0.113 this field is no longer listed in the API description for updateAsset.
Instead the API offers createStack to do this explicitly.

I opened a PR #477 that changes the implementation to use the new API call.

Unfortunately it seems that multiple stacks can be created for the same assets by repeating the same call with the same asset IDs. The returned stack response has a new stack ID each time.

I'm not sure whether this is problematic, but it might be best to check for existing stacks (using searchStacks) first, and only create stacks if none exists yet.
This is not yet implemented in my PR.

@simulot
Copy link
Owner

simulot commented Sep 7, 2024

I haven't noticed the API change.
This explains some issues.

I'm not sure whether this is problematic, but it might be best to check for existing stacks (using searchStacks) first, and only create stacks if none exists yet.
This is not yet implemented in my PR.

Thank you for your help! I'm in the middle of restructuring the code... Depending on the progression of our respective works, I'll either merge it to the current version or I'll do the adaptation for the refactored code

@m-georgi
Copy link
Author

m-georgi commented Sep 7, 2024

Great, sounds good.

I'll try to look into searching existing stacks tomorrow. I made some first experiments with the API, but it's not always behaving as expected (or documented).

@agittins
Copy link

@m-georgi have you had luck with solving the existing stacks issue? I'm planning my migration and this might be worth holding off for - or does the standalone stack command do exactly the same thing as the upload stack options, so I could just run it any time later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants