Closed dyreschlock closed 2 years ago
This is a 3 part process, as mentioned above.
Step 1 - CreatePocketEntries will run through each of the directories for each core listed in the PocketCore enum. Any rom that is in a folder that doesn't start with an underline, doesn't start with a dot, and has a file extension that matches what is listed in the PocketCore will have an entry created. The name of the game will be the filename minus the extension, the genre will be the folder name, and it will create an image name with the same name as the rom. These are all saved to the database.
Step 2 - CollectPocketThumbnails will grab all entries in the database that have been marked false for imageCopied. For each one, it will check if there's a thumbnail in the boxart folder. If not, it will check libretro-thumbnails on github for the image. The repo name is set in the PocketCore enum. If there's no image with that name online, it will fail and move on to the next. If it finds the file, it will download it to the boxart folder. If the download is successful, and the file exists in the boxart folder, imageCopied is marked true.
Step 3 - Unsure how to create library entries for the Pocket at this time. This could end up just being a shell script creation, and then we'll need a Step 4, which is running that script. We'll see.
The Filename of the Library image for a Rom is the rom file's CRC32 hash.
As part of the thumbnail collection process, this will check to see if the Library image exists. If it doesn't, it will copy the png with the rom hash into a directory ready to be processed by a shell script. After the program is complete, the script should be run, which will put the files in the appropriate directories. From there, running the program again will check to see if the Library image exists, and if it does, everything is good!
Unsure how this will look on the Pocket, though. Possible issues include:
This has been moved to a new project: dyreschlock/pocket-utils
Write a program that will (1) crawl through core directories from an SD card to catalog which roms have been sorted, (2) for each rom, download the box art from libretro, (3) create a Libraries entry for the game to be used on the Pocket.