Improved recommendations by using GOG APIs#1676
Draft
utkarshdalal wants to merge 33 commits into
Draft
Conversation
added 16 commits
July 5, 2026 19:24
New leftmost 'Recommended' library tab (All stays the default tab). Resolves the user's owned Steam games to GOG via the R2 gog-map.json.gz, seeds GOG's purchased_together per top game (by device recency then playtime), merges and ranks across seeds with a 'Because you played X' caption, and wraps GOG store links in the CJ affiliate deep link. GOG user_id is included when signed in. The existing single daily recommendation at the top of All is unchanged.
Gather owned games from Steam (live), GOG, Epic, Amazon (DAOs) and custom games (scanner). Resolve each to a GOG seed via direct GOG id, Steam appid, Epic namespace, then a normalized-title fallback (which also recovers AAA titles whose Steam appid isn't keyed in the map). No Steam sign-in required.
…on tap - Recommendations now render as LibraryItems through LibraryListPane/ LibraryCarouselPane, so they follow the selected layout (capsule/hero/ list/carousel) and match the rest of the library. - Tapping a card opens RecommendedGameScreen (via the shared detail pane) instead of launching the store link directly. LibraryDetailPane builds the RecommendedGame from the tapped GOG rec (description/hero/release date enriched from api.gog.com), falling back to the daily rec.
- Developer from api.gog.com/v2/games, review score+count from reviews.gog.com averageRating (value*20), fetched in parallel with the product detail. - VideoHero now plays YouTube trailers (which is all GOG provides) via a muted autoplay WebView, keeping ExoPlayer for direct-URL videos. GOG rec detail now passes the YouTube embed as videoUrl.
The rec ViewModel now fetches per-game compatibility (name-keyed, cache-first then batched via GameCompatibilityService) and pulls device/GPU run stats from the caches. Since recs are GOG-source but community stats mostly live under other sources, each name is looked up across all sources and re-keyed under GOG so LibraryState.statsFor resolves. Passed into the rec LibraryState so the native cards render the same compatibility badge and stats overlay as the library.
- The Recommended tab now renders the recommended star (Icons.Rounded.Star) instead of a text label, in both compact and expanded tab bars. - visibleEntries drops the Recommended tab when PrefManager.showRecommendations is off, so it stays hidden (and out of L1/R1 cycling) with the preference.
…trols - Tags from api.gog.com/v2 (_embedded.tags); description now uses the full body (was showing only the short lead, hence 'truncated'); developer + tags from one v2 fetch. - Media carousel: swipeable pager over all videos + screenshots (was only the first video), with a page counter; video pages play only when active. - Hide YouTube controls via a pointer-blocking overlay + iv_load_policy=3. - Surface 'Because you played X' on the detail screen.
- Description now uses gamesdb's plain-text 'summary' (clean one-paragraph), falling back to the stripped GOG HTML only if summary is missing. - YouTube trailer now uses the IFrame Player API with controls:0 (genuinely chromeless: no control bar or title) and programmatic muted autoplay, instead of the raw embed. No cropping.
Grid cards for recommendations now show the GOG review score as a rating pill top-left (reclaiming the redundant 'Recommended' badge), the discount top-right (reclaiming the source-icon slot), and the price in place of the perf-stats row. Ratings are fetched (reviews.gog.com averageRating) for the top 60 ranked recs in parallel and cached. Price/discount come from purchased_together.
…adge - Restore the perf-stats row on recommendation cards (compatibility/how-it-runs is important) instead of replacing it with price. - Price line under the title now shows final price + struck-through original + discount %. - Top-right shows a 'matches N of your games' badge (upvote arrow + count), only when a rec is seeded by 2+ of the user's games.
…, prefetch on load, tighter tab star
… similar strategy + higher limits
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
added 13 commits
July 5, 2026 23:43
…e only for the tab
# Conflicts: # app/src/main/java/app/gamenative/ui/screen/library/components/LibraryTabBar.kt
…pause button to trailer
…sharing in policy + toggle
…not just re-filter)
… crashes on Odin 3); drop inline WebView/ExoPlayer
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.
Description
Made recommendations more than just a static tile
Recording
Type of Change
Checklist
#code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.CONTRIBUTING.md.Summary by cubic
Adds a new GOG‑powered Recommended tab that personalizes picks from your Steam, GOG, Epic, Amazon, and custom games. Also fixes release date display, YouTube trailer playback, and capsule layout on small screens.
New Features
RECOMMENDEDtab (discover icon, leftmost). Hidden whenPrefManager.showRecommendationsis off. First open shows a simple disclosure; opting in setsPrefManager.recDisclosureShown. The All-page hero upgrades to a daily GOG pick after consent.GogSeedCollectorand a cached map inGogMapRepository(Steam appid, Epic namespace, or normalized title).GogRecommendationsRepositoryusing GOGpurchased_together+similar(includesuser_idwhen signed in), ranked across seeds with a GPU five‑star review boost, capped at 200. Store links are wrapped with the CJ affiliate deep link.RecommendedGame(developer, tags, review score/count). Adds a media carousel with YouTube trailers and screenshots (tap‑to‑play), and clearer descriptions with a GamesDB summary fallback and HTML stripped.Bug Fixes
Written for commit 1daa56f. Summary will update on new commits.