Author Topic: RetroPie Scraper Setup  (Read 5355 times)

Dragon

  • Administrator
  • Platinum Level
  • *****
  • Posts: 4862
  • Have you played my board game?
    • Rival Troops
RetroPie Scraper Setup
« on: February 17, 2017, 18:07:09 »
When I first got my RetroPie setup, I was having trouble with the Scraper, which is a feature that searches for images and descriptions of the games that you in your RetroPie EmulationStation. Unfortunately, every time that I ran the Scraper, I'd get the data but it wouldn't stay in the system after I rebooted.

I was searching for an answer to this for a while myself before I figured it out on my own. I'm running version 4 of RetroPie and despite it being mentioned that the Scraper was fixed in a previous version, I still had some troubleshooting to do. What I found in the error logs is the XML file wasn't able to be written to... in my case, they didn't exist at all, so I wrote this Bash script to create a basic XML file to start it off. After running, hopefully the built in Scraper for RetroPie will be able to save all your data.

Code: [Select]
#!/bin/bash
#RetroPie gamelist.xml setup
#by Nathaniel Dragon on 2017-02-04
for d in ~/RetroPie/roms/*; do
  if [ ! -f $d/gamelist.xml ]; then
    echo "Make gamelist.xml in $d"
    echo '<?xml version="1.0"?><gameList />' > $d/gamelist.xml
  else
    echo "$d already has a file."
  fi
done

I know that not everyone trying to get this to work is a programmer, although, you probably have already found out something about scripts on Linux. In case you've never written or run a Bash script before, save that code in a file on your RaspberryPi as something like "setup.sh" and then make it executable with "chmod 755 setup.sh" and finally run with "./setup.sh" ...

I've also posted this up on the RetroPie forum for other users there, but I haven't uploaded the code to GitHub or anything yet, just copied the text... hopefully someone else can make some good use of my script though, or at least learn from it.

By the way, this is a fix for the built-in Scraper - something that is probably overcome with SSelph???s Scraper, but I wanted to see about using the built-in program.
« Last Edit: February 17, 2017, 18:12:32 by Dragon »
"Hello IT. Have you tried turning it off and on again? ... OK, well, the button on the side. Is it glowing?... Yeah, you need to turn it on. Err, the button turns it on. Yeah, you do know how a button works, don't you? No, not on clothes." - Roy (The IT Crowd)

derelicte

  • Silver Level
  • ***
  • Posts: 122
Re: RetroPie Scraper Setup
« Reply #1 on: July 22, 2017, 19:48:50 »
Thanks for building this scraper fix! Definitely a great thing to have access to. It's nice having someone around that understands all this stuff and how to write programs. Certainly nothing I would have tackled. I'll stick to the stuff I'm good at, which definitely isn't computers. Lol
A man's perception creates his own reality.

Dragon

  • Administrator
  • Platinum Level
  • *****
  • Posts: 4862
  • Have you played my board game?
    • Rival Troops
Re: RetroPie Scraper Setup
« Reply #2 on: July 22, 2017, 21:01:47 »
You're welcome. Glad I could be of help to you.
"Hello IT. Have you tried turning it off and on again? ... OK, well, the button on the side. Is it glowing?... Yeah, you need to turn it on. Err, the button turns it on. Yeah, you do know how a button works, don't you? No, not on clothes." - Roy (The IT Crowd)