fix: send isFavorite as boolean in JSON body for Immich 3.x compatibility - #31
Open
Infineon12 wants to merge 1 commit into
Open
fix: send isFavorite as boolean in JSON body for Immich 3.x compatibility#31Infineon12 wants to merge 1 commit into
Infineon12 wants to merge 1 commit into
Conversation
|
Can this please be merged? I believe the integration is completely broken with the latest Immich. |
Author
|
So I think I can't do anything, needs to be done by a maintainer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After upgrading Immich to 3.x, the integration fails to load favorite images:
Error from API: body={"message":"Validation failed","errors":[{"expected":"boolean","code":"invalid_type","path":["isFavorite"],"message":"Invalid input: expected boolean, received string"}]}Root Cause
list_favorite_images()inhub.pywas sending the request body usingdata=, which causes aiohttp to serialize all values as strings. Immich 3.x now strictly validates thatisFavoriteis a boolean.Fix
data=tojson=so the body is sent as JSONjsontopayloadto avoid shadowing the built-in module"true"(string) toTrue(boolean)Fixes #30