[Feature] Download a ROM by file category
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 53/100
Research direction
Start by tracing GET /api/roms/{id}/content/{file_name} and its HEAD counterpart, then inspect how file_ids selects files and how the response builds single-file downloads, zip archives, and generated .m3u files. Add category inclusion and exclusion that combine with file_ids; done means both methods return only the selected files in the described formats.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
A client that installs games on a device fetches a game through GET /api/roms/{id}/content/{file_name} and often wants only the game's own files, not the manuals, soundtracks, screenshots, patches or other files RomM files under a category folder. The only selector today is file_ids, a list of individual file ids, so leaving one manual/ folder out of a folder game (a PS3 or Wii U dump) means listing thousands of ids. The request line then outgrows the 16 KiB the nginx in the image accepts, or less behind a reverse proxy, and the client has to download the whole game and delete what it did not want.
Describe the solution you'd like
A query parameter on the content endpoint (and its HEAD) that selects files by category, for example include_categories=game, with exclude_categories=manual,soundtrack as its counterpart. The response would be built exactly as for the selected files: a single file served as itself, several as a zip whose generated .m3u is built from those files. It combines with file_ids.
Describe alternatives you've considered
file_idswith every file to keep: works, but breaks on large folder games because of the URL length.- A POST variant of the content endpoint taking the id list in the body: avoids the limit, but every client still computes the list.
- Downloading everything and deleting the extras afterwards: a fallback, at the cost of the extra download.
Additional context
Since 5.4.0 (#4581, #4854) a file's category comes only from the folder directly below the game's folder, which makes it reliable enough to filter on. Grout, Argosy and Ludo each filter by category on their own side today, with different lists.
Related: #2707 asks for this choice in the UI (option 2); this is the API side of it, which clients need regardless.
- Dominant language
- Python
- Stars
- 13.3k
- Forks
- 747
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 207
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rommapp/romm
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rommapp/romm#5857 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rommapp/romm#4178 · 1 reaction ·
Maintainers usually reply within 1 day
-
[UI/UX] Misaligned number in searchPossibly taken @NevesHenry claimed this today. Openui/ux
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
[Bug] Games do not show up in search if more than 2 letters are used.Possibly taken @andest01 claimed this today. Open
Difficulty 3/5 1-2 days Newbie friendliness 58/100
rommapp/romm#5853 · 7 comments ·
Maintainers usually reply within 1 day
Similar issues
-
area:print-dispatch
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Apich-Organization/rssn#295 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
chore claimed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
schuyler/corvidae#1424 · 2 comments ·
Maintainers usually reply within 1 day