Skip to content

Feat: custom games add user-supplied cover image support#1494

Open
Catpotatos wants to merge 1 commit into
utkarshdalal:masterfrom
Catpotatos:feat-cover-art-custom-games
Open

Feat: custom games add user-supplied cover image support#1494
Catpotatos wants to merge 1 commit into
utkarshdalal:masterfrom
Catpotatos:feat-cover-art-custom-games

Conversation

@Catpotatos

@Catpotatos Catpotatos commented May 31, 2026

Copy link
Copy Markdown
Contributor

Description

Add cover-art to custom games. User adds their own images.

User adds image to custom game folder:
"cover" - for both horizontal and vertical images
"coverh" - for horizontal images (Hero + background)
"coverv" - for vertical images (Capsule + Carrousel)

How to use:

  • Place image with extentions png, jpg, jpeg in main custom game folder.
  • name it "cover.jpg" for example, it will auto add the image for both horizontal and vertical views.
  • User can also specify if they want a certain image to only be used by horizonal view or vertical by naming the image "coverh" or "coverv" with any of the supported image extentions.

Flow goes:
"coverh" or "coverv" take prority
then "cover"
then steamdb (already in code)

Recording

image image image image

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #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.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Add user-supplied cover art for custom games, used across hero/header/capsule/carousel views. Users can drop images in the game’s folder, which take priority over SteamGridDB.

  • New Features
    • Place files in the custom game’s main folder: coverh (horizontal), coverv (vertical), cover (both).
    • Horizontal views (hero/header/carousel) use coverh or cover; vertical (capsule) uses coverv or cover.
    • Priority: coverh/coverv > cover > SteamGridDB.
    • Supports png, jpg, jpeg, webp. Searches top-level of the folder only.

Written for commit a1a5ec4. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

Release Notes

  • New Features
    • Users can now supply custom cover images for custom games in both vertical (capsule) and horizontal (hero) formats. These custom covers take priority over default images across all game display views.

Add cover-art to custom games. User adds their own images.

User adds image to custom game folder:
"cover" - for both horizontal and vertical images
"coverh" - for horizontal images (Hero + background)
"coverv" - for vertical images (Capsule + Carrousel)

How to use:
- Place image with extentions png, jpg, jpeg in main custom game folder.
- name it "cover.jpg" for example, it will auto add the image for both horizontal and vertical views.
- User can also specify if they want a certain image to only be used by horizonal view or vertical by naming the image "coverh" or "coverv" with any of the supported image extentions.
Copilot AI review requested due to automatic review settings May 31, 2026 09:20
@Catpotatos Catpotatos requested a review from utkarshdalal as a code owner May 31, 2026 09:20
@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a0775cc6-eadf-45f2-af2b-95f2d21da29f

📥 Commits

Reviewing files that changed from the base of the PR and between 2bea2aa and a1a5ec4.

📒 Files selected for processing (3)
  • app/src/main/java/app/gamenative/ui/screen/library/appscreen/CustomGameAppScreen.kt
  • app/src/main/java/app/gamenative/ui/screen/library/components/LibraryGridCard.kt
  • app/src/main/java/app/gamenative/utils/CustomGameScanner.kt

📝 Walkthrough

Walkthrough

This PR implements user-supplied cover image prioritization for custom games. New utility functions discover user-provided hero and capsule cover art in game folders; the app screen and grid card rendering then use these user covers before falling back to SteamGridDB-derived images across hero, capsule, header, and carousel panes.

Changes

User-supplied cover image prioritization

Layer / File(s) Summary
Cover discovery utilities
app/src/main/java/app/gamenative/utils/CustomGameScanner.kt
Adds findCapsuleCoverForCustomGame, findHeroCoverForCustomGame, and folder-level variants that search for user-provided coverv/coverh (or generic cover) images with extension priority (PNG > JPG > WEBP), returning file:// URIs.
App screen image prioritization
app/src/main/java/app/gamenative/ui/screen/library/appscreen/CustomGameAppScreen.kt
getGameDisplayInfo hero, capsule, and header image selection now checks for user-provided covers first via the new scanner utilities before falling back to SteamGridDB scan results.
Grid card image prioritization
app/src/main/java/app/gamenative/ui/screen/library/components/LibraryGridCard.kt
getGridImageUrl CUSTOM_GAME branch now prioritizes user-provided capsule and hero covers for each pane type (capsule, hero, carousel) before SteamGridDB or stored image URLs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • phobos665

Poem

🐰 User covers now reign supreme,
Before the SteamGrid's distant gleam,
Hero, capsule, bright and fair,
Custom art takes pride of care!
~CodeRabbit's cover tale 🎨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main feature added: user-supplied cover image support for custom games, which is the primary change across all modified files.
Description check ✅ Passed The description includes all required sections: detailed explanation of the feature, recording/screenshots, type of change selection, and completed checklist items demonstrating alignment and approval discussion.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread app/src/main/java/app/gamenative/utils/CustomGameScanner.kt
@phobos665

phobos665 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

@Catpotatos Thanks for doing this. Speaking of, I've got a branch up also that allows us to choose the shortcut icon via SteamGridDB. (Still requires some testing and adjustments)

Branch URL: https://github.com/phobos665/GameNative/tree/feat/steamdb-shortcut-icons

I think it might be worth us having a chat and combining that potentially as it could be the best of both worlds for both icons & covers.

@Catpotatos

Catpotatos commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@Catpotatos Thanks for doing this. Speaking of, I've got a branch up also that allows us to choose the cover via SteamGridDB.

I think it might be worth us having a chat and combining that potentially. Will send over a branch as I think it's pretty much done

That's quite cool.

I wanted a simple way of users adding their own covers, kind of like they can do with Linux handhelds in Rocknix and other platforms.

It would be fantastic to have both.

The list view already populated on auto prior to this PR, but hero, carousel and capsule were just empty.

We could utilise the priority method and have both methods in.

Edit:
Great news @phobos665 ! Your icons branch and my covers branch fit right in with each other. No stepping on toes :)

image

I will have a test of yours tomorrow, seems quite interesting.

@phobos665

Copy link
Copy Markdown
Contributor

@Catpotatos Thanks for doing this. Speaking of, I've got a branch up also that allows us to choose the cover via SteamGridDB.
I think it might be worth us having a chat and combining that potentially. Will send over a branch as I think it's pretty much done

That's quite cool.

I wanted a simple way of users adding their own covers, kind of like they can do with Linux handhelds in Rocknix and other platforms.

It would be fantastic to have both.

The list view already populated on auto prior to this PR, but hero, carousel and capsule were just empty.

We could utilise the priority method and have both methods in.

Edit: Great news @phobos665 ! Your icons branch and my covers branch fit right in with each other. No stepping on toes :)

image I will have a test of yours tomorrow, seems quite interesting.

Amazing to hear.

I'll need to return to this once I've cleared my plate, but I'm glad we can both deliver things independently, and then we can always improve on things further once both are merged

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