Repository navigation
Feature/sync bookmark status - #3301
Open
liubquanti wants to merge 3 commits into
Open
liubquanti wants to merge 3 commits into
liubquanti wants to merge 3 commits 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>
Changing a title's bookmark status now sets the same status on every logged in sync account (AniList, MAL, ...) that has an id for the title, then reloads the library once the update has landed. The TV layout has no sync controls, so this was the only way to manage those lists there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Yes, such a fundamental change needs a toggle. We cannot change the expected behavior in the app too much, since many users have gotten used to the existing behavior. |
Author
|
I’ve added a toggle to the account settings to enable synchronisation, which is disabled by default. I tested it on the same Chromecast using my AniList account. |
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.
Sync bookmark status to logged in sync accounts
Problem
The TV result page has no sync (AniList / MAL) controls at all; it only has the local
bookmark button. On TV the only interaction with a tracker is the player bumping the
episode count, and that only works for titles that are already on the user's list.
For a title that isn't, the status is
NONE, soupdateStatustakes the delete pathand nothing happens. As a result there is no way to add a title to AniList / MAL from
a TV.
Change
When the bookmark status of a title changes (
ResultViewModel2.updateWatchStatus), thesame status is now set on every logged in sync account that has an id for the title
in
syncData:WatchTypeis mapped toSyncWatchType(same ids for 0–4,NONEmapped explicitly,since the two enums use different ids for it).
progress are kept; only the status changes.
NONE) removes the entry from the tracker list as well.bookmark change usually fetches the remote list before the update has landed and
then clears
requireLibraryRefresh, leaving the library stale.Accounts the user isn't logged into, and titles without a tracker id, are untouched.
Open question
This changes behaviour for everyone who is logged into a tracker: bookmarks were
purely local before. If you prefer, I can put it behind a setting
(e.g. "Sync bookmarks to tracker accounts"), off or on by default.
Testing
Tested on a Chromecast with Google TV (Android 14) with an AniList account:
as Planning (
syncWatchStatus AniList 154587 => PLANTOWATCH: Success(true)).