Skip to content

Add more plateforms to cover styles#3098

Merged
gantoine merged 1 commit intorommapp:masterfrom
Drarox:master
Mar 9, 2026
Merged

Add more plateforms to cover styles#3098
gantoine merged 1 commit intorommapp:masterfrom
Drarox:master

Conversation

@Drarox
Copy link
Contributor

@Drarox Drarox commented Mar 9, 2026

Description
Thanks for merging #3060.

My initial plan wasn’t to show the new cover only on specific platforms. I wanted each platform to be able to choose whichever style fits best. However, the current approach also works, and I understand that having fewer options can make the implementation cleaner.

In this PR, I’ve added support for a few more platforms so they work with the same system as well.

Checklist

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

@greptile-apps
Copy link

greptile-apps bot commented Mar 9, 2026

Greptile Summary

This PR extends the existing platform cover-style aspect-ratio system introduced in #3060 by adding more platform slugs to the existing sets and introducing a new SWITCH_PLATFORMS set. Changes include: adding win to DVD_PLATFORMS, adding ps5, psvita, xboxone, and series-x-s to BLU_RAY_PLATFORMS, adding nintendo-dsi to DS_3DS_PLATFORMS, and creating a new SWITCH_PLATFORMS set (switch, switch-2) with a dedicated 0.62/1 aspect ratio that matches the physical Nintendo Switch game case dimensions.

  • All platform slugs used (psvita, series-x-s, switch-2, xboxone, win, nintendo-dsi) are confirmed valid against the backend Platform enum in base_handler.py
  • No slug appears in more than one set, so no platform will accidentally receive duplicate cover-style options
  • The Switch aspect ratio of 0.62 / 1 is geometrically accurate (Switch cases are ~63 mm × 102 mm ≈ 0.618/1)
  • psvita is grouped under BLU_RAY_PLATFORMS which is a minor categorisation concern — the Vita uses proprietary game cards, not Blu-ray — though the cover dimensions are close enough that it works visually

Confidence Score: 4/5

  • Safe to merge — changes are additive, confined to a single file, and use verified platform slugs.
  • All slug values were cross-referenced with the backend Platform enum and are valid. No duplicate entries exist across sets, and the new Switch ratio is geometrically accurate. The only minor concern is the categorization of psvita under Blu-ray rather than giving it a dedicated entry, which is cosmetic rather than a breaking issue.
  • No files require special attention beyond the minor PSVita categorization note.

Important Files Changed

Filename Overview
frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue Expands platform cover-style sets: adds win to DVD, adds ps5/psvita/xboxone/series-x-s to Blu-ray, adds nintendo-dsi to DS/3DS, and introduces a new SWITCH_PLATFORMS set (0.62/1 ratio) for switch and switch-2.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    slug["Platform slug (lowercase)"]
    slug --> dvd{"DVD_PLATFORMS?\ndvd-player, ps2, ngc, wii,\nwiiu, xbox, xbox360, win"}
    slug --> blu{"BLU_RAY_PLATFORMS?\nblu-ray-player, ps3, ps4, ps5,\npsvita, xboxone, series-x-s"}
    slug --> ds{"DS_3DS_PLATFORMS?\nnds, nintendo-dsi, 3ds,\nnew-nintendo-3ds"}
    slug --> psp{"PSP_PLATFORMS?\npsp, psp-minis"}
    slug --> sw{"SWITCH_PLATFORMS?\nswitch, switch-2"}

    dvd -->|yes| dvdOpt["Add: 0.71/1 (DVD)"]
    blu -->|yes| bluOpt["Add: 0.79/1 (Blu-ray Full)\n0.87/1 (Blu-ray Plastic)"]
    ds -->|yes| dsOpt["Add: 1.08/1 (DS/3DS)"]
    psp -->|yes| pspOpt["Add: 0.58/1 (PSP)"]
    sw -->|yes| swOpt["Add: 0.62/1 (Switch)"]

    dvdOpt --> base
    bluOpt --> base
    dsOpt --> base
    pspOpt --> base
    swOpt --> base

    base["Base options always included:\n2/3 (SteamGridDB)\n3/4 (IGDB/MobyGames)\n1/1 (Squared)\n16/11 (Horizontal)"]
    base --> result["aspectRatioOptions array\n(displayed in cover-style picker)"]
Loading

Last reviewed commit: 9e529ca

"ps3",
"ps4",
"ps5",
"psvita",
Copy link

Choose a reason for hiding this comment

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

PSVita uses proprietary game cards, not Blu-ray

psvita is added to BLU_RAY_PLATFORMS, but the PS Vita uses its own proprietary game card format — not Blu-ray discs. The physical game case dimensions for PS Vita (~84 mm × 104 mm ≈ 0.808/1) are indeed close to the Blu-ray "Full artwork" ratio (0.79/1), so grouping them may be a pragmatic choice rather than a strict categorization.

That said, it might be worth adding a dedicated PSVita aspect ratio option (e.g., 0.81 / 1) with a source label like "PS Vita" — both for accuracy and so that users can see a label that matches their platform, similar to how PSP has its own dedicated entry. This is a suggestion rather than a hard bug, since the two ratios are close enough that it may not matter visually.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Member

@gantoine gantoine left a comment

Choose a reason for hiding this comment

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

Looks good!

I wanted each platform to be able to choose whichever style fits best.

Your original PR made perfect sense, but this approach should/will allow us to add as many custom ratios as we want without crowding the list in the UI.

@gantoine gantoine merged commit 8e0ebad into rommapp:master Mar 9, 2026
3 checks passed
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