[Feature] Treat nested files outside a category folder as `game`

Open Beginner friendly
#5,488 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with RomFileSchema.default_category_for_non_nested, named in the issue, and trace how it assigns categories to files inside a game's folder. Check the existing tests for category defaults and add coverage for a nested file outside a category folder. Done means that file is categorized as game, while files below a category folder retain that category.

Written by the indexing model from the issue text.

Description

Is your feature request related to a problem? Please describe.
A file directly in a game's folder is game (RomFileSchema.default_category_for_non_nested), and a file below a folder named after a category takes that category (since #4854, the folder directly below the game's folder). Any other nested file has no category. For a folder game that is most of the game: a PS3 dump's PS3_GAME/USRDIR/…, Wii U code/, content/ and meta/, a DOS game's subfolders. A client that selects a game's files by game gets an incomplete game, so each client guesses what an uncategorised file is: Grout treats it as playable, Argosy files it as "other" and leaves it out by default.

Describe the solution you'd like
A nested file below no category folder is game, the same as a top-level file, so game always means the files that make up the game.

Describe alternatives you've considered

  • Leaving it to clients: they already disagree.
  • A rule per platform for folder games: more to maintain than one rule for all nested files.

Additional context
The game default for top-level files came with the patcher (#3225), so single-file ROMs would show up in its file selector; nested files were not part of that change. Together with #5487, a client could fetch a game with include_categories=game alone.

Dominant language
Python
Stars
13.3k
Forks
747
Avg merge
1d 3h
Merged PRs (30d)
183

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rommapp/romm

All issues in rommapp/romm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.