This project was inspired by my 9yr old son who constantly wants to try different games and I got annoyed with the manual process so I made this so I can dump files on a local server, and he can click a couple of buttons and be up and running (mostly) without my help.
It's messy, one day I will clean it up, but for now it gets the job done.
Note
This is used in conjuction with (none of this is require, just my use case) EmuDeck and Playnite (w/the EmuDeck addon). The resulting XCI is copied to the switch roms directory, then scanned on startup by Playnite and ready to play in most cases. Some games need settings tweaked in the emulator or mods to work correctly, that isn't covered here.
Important
Directory structure doesn't matter, base/update/dlc are determined from the titleid. I don't want to process the file to get the information, with a large collection, over the network, that gets very slow. (very specific to my use case)
Warning
Filename matters, at a minimum you need [<16 digit titleid>][<version>].(nsp|nsz|xci|xcz)
, the order of the version and titleid doesn't matter.
/switch_roms/base/MONSTER HUNTER RISE[0100B04011742000][US][v0].nsz
/switch_roms/update/Monster Hunter Rise[0100B04011742800][US][v2162688].nsz
/switch_roms/dlc/Floral Sleeves Hunter layered armor piece[0100B04011743065][US][v0].nsz
/switch_roms/dlc/MONSTER HUNTER RISE [0100B040117430C5][v0][DLC 197].nsz
/switch_roms/dlc/Canyne Mask Hunter layered armor piece[0100B04011743054][US][v0].nsz
/switch_roms/dlc/MONSTER HUNTER RISE [0100B0401174307A][v0][DLC].nsz
...
Caution
Games with large amounts of DLC take a considerable amount of time to process when using NSZ/XCZ, each file takes around 12 seconds to process, even when being read locally. This is a limitation of Squirrel/NCA when dealing with compression, I'm looking for alternatives or fixes that could speed it up.