Skip to content

Fix Trakt scrobble for non-standard IDs#1314

Merged
tapframe merged 1 commit into
NuvioMedia:cmp-rewritefrom
skoruppa:port/trakt-non-standard-ids
Jun 10, 2026
Merged

Fix Trakt scrobble for non-standard IDs#1314
tapframe merged 1 commit into
NuvioMedia:cmp-rewritefrom
skoruppa:port/trakt-non-standard-ids

Conversation

@skoruppa

Copy link
Copy Markdown
Member

Summary

Port Trakt scrobble and Continue Watching fixes from NuvioTV (PRs #2202, #2220, #2238). Alignment with functionality already shipping in the TV version.

  1. Don't send Trakt scrobble when contentId resolves to no valid IDs (prevents wrong title-based fuzzy match)
  2. Fallback to videoId when contentId is not Trakt-resolvable (handles addons with non-standard IDs like tun_tt7821582)
  3. Preserve non-Trakt-compatible CW entries (kitsu:, mal:, anilist:) when Trakt is the active progress source

PR type

  • Reproducible bug fix
  • UI glitch/bug fix
  • Behavior bug/regression fix
  • Small maintenance only, with no UI or behavior change
  • Docs accuracy fix
  • Translation/localization only
  • Approved larger or directional change

Why

When using anime addons that provide non-standard content IDs (kitsu:, mal:, anilist:, or prefixed like tun_tt7821582):

  • Trakt scrobble was sent with just a title, causing wrong show to be matched (e.g. One Piece anime matched to live-action)
  • Continue Watching lost non-Trakt entries when Trakt was the active CW source, since Trakt API never returns those IDs
  • Addons providing valid IMDB in videoId but garbage in contentId had no scrobble or duplicate CW entries

All three bugs are already fixed in NuvioTV. This PR brings parity to mobile.

Issue or approval

No linked issue - feature parity port from NuvioTV PRs #2202, #2220, #2238.

UI / behavior impact

  • No UI change
  • No behavior change
  • UI changed only to fix a documented glitch/bug
  • Behavior changed only to fix a documented bug/regression
  • UI change has explicit maintainer approval
  • Behavior change has explicit maintainer approval

Policy check

  • I have read and understood CONTRIBUTING.md.
  • This PR is small, focused, and limited to one problem.
  • This PR is not cosmetic-only.
  • Any UI change fixes a linked glitch/bug and includes visual proof, or this PR has no UI change.
  • Any behavior change fixes a linked bug/regression or has explicit approval, or this PR has no behavior change.
  • This PR does not bundle unrelated refactors, cleanups, formatting, or drive-by changes.
  • This PR does not add dependencies, architecture changes, migrations, or product-direction changes without explicit approval.
  • I listed the testing performed below.

Scope boundaries

  • Does not add Kitsu->IMDB resolution (separate concern)
  • Does not change Nuvio Sync merge logic (already handles non-Trakt IDs correctly)
  • Does not modify UI, stream selection, or badge logic
  • NuvioTV also fixed "stop playback on episode switch" in #2202 — intentionally omitted here as NuvioMobile handles episode transitions differently

Testing

  • Built successfully with compileFullDebugKotlinAndroid
  • Verified buildItem() returns null for kitsu:12 contentId with no videoId fallback (no scrobble sent)
  • Verified buildItem() returns valid item for contentId tun_tt7821582 with videoId tt7821582:3:7 (IMDB extracted from videoId)
  • Verified currentEntries() merges local non-Trakt items alongside Trakt remote items when Trakt is active CW source
  • Verified resolveEffectiveContentId returns original ID when already valid, falls back to videoId when not

Screenshots / Video (UI changes only)

Not a UI change.

Breaking changes

None.

Linked issues

No linked issue - feature parity port from NuvioTV PRs #2202, #2220, #2238.

@tapframe tapframe merged commit a0a9732 into NuvioMedia:cmp-rewrite Jun 10, 2026
1 check failed
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

Successfully merging this pull request may close these issues.

2 participants