Issues with Gamelist Sorting
-
Pi Model or other hardware: pi 4, 8gb
Power Supply used: canakit official
RetroPie Version Used: 4.8.5
Built From: Raspberry Pi Imager
USB Devices connected: Keyboard
Controller used: snes style game controllerI seem to be running into a weird issue on this install where the "sort games by" option in emulationStation isn't sorting the list very well. For instance, I have a bunch of SNES roms. They all play fine and show in the system menu fine, but they are all out of order. I've attempted to use a couple of scrapers. Most recently, I installed skyscraper from the Retropie-setup menu and did a scrape of all the snes games. The output from the scrape seemed like it was doing very well at pulling all the relevant info. I built the game list and attempted to use the "sort by" filename ascending and some of the list is right, but there are also just a bunch of other titles scattered throughout the list randomly. I feel like I'm probably just missing something here but not sure where else to look.
-
I may have found something interesting. I was looking at the game metadata via the view option in emulation station and there is a "sort name" field. In that it has the game title but also a bunch of random characters at the beginning. Removed those, and it sorts proper. How would one go about overwriting that for a bunch of games at once?
-
@doyouheararing said in Issues with Gamelist Sorting:
How would one go about overwriting that for a bunch of games at once?
If you can plug in a keyboard and press F4 to access the console, or if you can log in remotely via SSH, you could remove all (!) sortnames in a single command with:
sed '/<sortname>/d' ~/.emulationstation/gamelists/*/gamelist.xml -i.bup
sed
: stream edit, command to manipulate input streams'/<sortname>/d'
: the "script" for sed to follow: identify all lines with <sortname> and delete them.~/.emulationstation/gamelists/*/gamelist.xml
: the file(s) to use as inputs for the stream editor. All the gamelists in your gamelists/<console> folders (see note below).-i.bup
: edit files in-place, and save a backup (with -i, edit files in-place rather than print to console. With -i[SUFFIX], make a backup first.)Note: if this didn't work, your gamelists might be in the rom folders instead of the ES config folder. Try again with:
~/RetroPie/roms/*/gamelist.xml
as the file path instead. Note that Linux is case sensitive, make sure to hit that capital R-P in RetroPie. -
@doyouheararing said in Issues with Gamelist Sorting:
there is a "sort name" field. In that it has the game title but also a bunch of random characters at the beginning
Question is then which scraping site did you use and which scraper (in addition to Skyscraper), that may have put the characters there?
-
@sleve_mcdichael said in Issues with Gamelist Sorting:
If you can plug in a keyboard and press F4 to access the console, or if you can log in remotely via SSH, you could remove all (!) sortnames in a single command with:
sed '/<sortname>/d' ~/.emulationstation/gamelists/*/gamelist.xml -i.bup
This sounds awesome. Thanks!
@Lolonois said in Issues with Gamelist Sorting:
Question is then which scraping site did you use and which scraper (in addition to Skyscraper), that may have put the characters there?
@Lolonois So I've used "Scraper for EmulationStation by Steven Selph" and Skyscraper. I'm pretty new to the whole process. I used the defaults for Stevens, which used thegamesdb for its source. Then I felt more comfortable when using skyscraper and used ScreenScraper with it. Honestly, from what I could tell, I think this issue were their before using the scrapers.
-
This post is deleted! -
Sweet!!
@sleve_mcdichael Thanks for that info. Worked a beautiful treat!
I also found where I likely messed up. Some of the roms I have were copied over from another system that uses the same file structure. I ended up finding some gamelist files where I didn't expect them to be and those were the files that had the "sortname" section. Just removed those files all together and re-scraped and generated new gamelists for all the systems. Everything is sorting perfect now.
Thanks for the help!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.