Repository navigation
fix(AniList): library parsing and list updates - #3300
Open
liubquanti wants to merge 1 commit into
Open
liubquanti wants to merge 1 commit into
liubquanti wants to merge 1 commit into
Conversation
- Make nullable the AniList fields that can be null (dates, episodes,
seasonYear, updatedAt). Since the move to kotlinx serialization these
are no longer coerced to 0, which made the library list fail to parse
for practically every account.
- SaveMediaListEntry: only declare and pass scoreRaw / progress when they
have a value. AniList rejected the whole mutation otherwise
("Variable $scoreRaw is not defined"), while it was reported as success.
- Treat GraphQL errors in the mutation response as a failure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fix AniList library parsing and list updates
Since #2952 (migration to kotlinx serialization) AniList sync is broken in two ways.
1. Library list fails to load
Jackson used to coerce
nullinto0for non-nullableIntfields, kotlinx does not.AniList returns
nullforcompletedAt/startedAtdates of any entry that isn'tcompleted, as well as
episodes(airing shows) andseasonYear(unannounced shows), sogetFullAniListListfails on practically every account:These fields are now nullable.
StartedAtfields areInt?to match AniList'sFuzzyDatetype (they wereString?, but AniList sends numbers).2. Adding / updating titles silently fails
SaveMediaListEntryalways passesscoreRaw: $scoreRaw, progress: $progress, but onlydeclares those variables when they are non-null. When no score is set AniList rejects the
whole mutation:
postDataAboutIdonly checkeddata != "", so the failure was reported as success.Now only the variables that have a value are declared and passed, and a response
containing GraphQL
errorsis logged and returnsfalse.Testing
AniListParsingTestcovering a list response with null dates/episodes andGraphQL error detection.
again, and status updates without a score now reach AniList.