RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Issues with Gamelist Sorting

    Scheduled Pinned Locked Moved Help and Support
    gamelistsorting roms
    7 Posts 3 Posters 732 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      doyouheararing
      last edited by

      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 controller

      I 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.

      1 Reply Last reply Reply Quote 0
      • D
        doyouheararing
        last edited by

        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?

        S LolonoisL 2 Replies Last reply Reply Quote 0
        • S
          sleve_mcdichael @doyouheararing
          last edited by sleve_mcdichael

          @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.

          D 1 Reply Last reply Reply Quote 0
          • LolonoisL
            Lolonois @doyouheararing
            last edited by

            @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?

            D 1 Reply Last reply Reply Quote 0
            • D
              doyouheararing @Lolonois
              last edited by doyouheararing

              @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.

              1 Reply Last reply Reply Quote 0
              • D
                doyouheararing @sleve_mcdichael
                last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • D
                  doyouheararing
                  last edited by

                  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!

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post

                  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.