Repository navigation
fix(library): take a folder library's platform from the folder under the root - #325
BlizzHacker wants to merge 1 commit into
Conversation
…the root A folder library made a game of every file with a ROM extension anywhere under the root and named its platform after the folder directly above it. A Switch release that bundles an emulator NAND therefore produced one "game" per .nca content file, titled by its content id, under platforms called 00000000, 00000001 ... on the Games page and on every friend's shelf. ROMarr's own hidden .romarr-collection-spool folder showed up as a platform as well. - The platform is the first folder under the root, however deep the file (snes/USA/Game.smc is snes; switch/Game/update/x.nsp is switch). RomM's roms/<platform> layout still reads as <platform>. - The walk skips hidden folders and the NAND content stores Contents/registered and Contents/placehld. A user folder that happens to be called "registered" elsewhere is still read. Fixes #324 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
Fixes #324: friends (and the Games page) saw hash titles under platforms called
00000000,0000000Cand so on.The folder library made a game of every ROM-extension file anywhere under the root and took the platform from the folder directly above the file. A Switch release folder that bundles an emulator NAND holds hundreds of
.ncacontent files named by content id inContents/registered/<8 hex digits>/, and each became a "game".snes/USA/Game.smcissnes,switch/Game/update/Game.nspisswitch, and RomM'sroms/<platform>layout still reads as<platform>..romarr-collection-spool, which showed up on a friend's shelf as a platform) and the NAND content storesContents/registeredandContents/placehld. A folder namedregisteredanywhere else is still read..ncastays a Switch extension, because extracted games use it.Not in this PR (still open on #324)
3dsandNintendo 3DS) when a folder library and a RomM library are both shared.Test plan
tests/test_folder_library_nested.py(6 tests): deep files keep the top platform, RomMroms/layout, root-level file, Switch NAND files skipped, hidden folders skipped, a userregisteredfolder still read. 3 of them failed before the fix.mainin this environment (ROM Hub version in the test venv).🤖 Generated with Claude Code
Summary by CodeRabbit
Contentsare excluded from library results. A user folder namedregisteredremains included.