Skip to content

JAST USA Library: Handle updated product response - #766

Open
Dawnflare wants to merge 1 commit into
darklinkpower:masterfrom
Dawnflare:fix/jast-variant-deserialization
Open

JAST USA Library: Handle updated product response#766
Dawnflare wants to merge 1 commit into
darklinkpower:masterfrom
Dawnflare:fix/jast-variant-deserialization

Conversation

@Dawnflare

@Dawnflare Dawnflare commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the JAST failed sync issue described in #765

Details

  • update the JAST account response DTO to ignore the now-reference-only plural variants field and deserialize game from the containing product
  • retain complete products while paging through the account library response
  • map library entries from the embedded singular variant plus product-level game data
  • preserve compatibility with the previous response layout by falling back to variant.game

Root cause

JAST changed the authenticated library response around July 23, 2026. The plural products[].variants field now contains JSON-LD URI references such as /api/v2/shop/product-variants/nnya033 instead of embedded variant objects. The existing DTO declared this field as Variant[], so Newtonsoft.Json aborted with a JsonSerializationException before the library could be imported.

The same response update also moved game from the singular embedded variant to its containing product. Ignoring only the plural field would therefore deserialize successfully but later fail when mapping the game and translation data.

User impact

JAST USA library synchronization currently fails for affected users on every attempt. This change accepts the updated response shape and restores game import while remaining compatible with the earlier nested-game shape.

Validation

  • rebuilt JastUsaLibrary.csproj successfully with MSBuild in Debug configuration
  • deserialized a captured current JAST response containing 20 products (120 total across 6 pages); all products retained the required variant and game data
  • verified a legacy response fixture still resolves game through the fallback path
  • installed the Debug build into a Playnite 10 portable installation and completed a real authenticated JAST library sync successfully
  • ran git diff --check

Fixes #765

@Dawnflare
Dawnflare marked this pull request as ready for review July 26, 2026 05:24
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.

[JAST USA Library] Error During Library Update

1 participant