What am I doing wrong with shortcuts?
-
So, all my box art is stored here (that's just how it was when my Pi arrived):
/opt/retropie/configs/all/emulationstation/downloaded_images
Obviously if I'm adding some new art through the EmulationStation menu it's a pain to have to type that all out every time, so I created a shortcut called pics in /home/pi (I didn't have the permissions to create it any further down than that). The text of the shortcut is this:
/opt/retropie/configs.hdmi/all/emulationstation/downloaded_images
So now if I'm adding art for, say, an NES game, I only have to type "/home/pi/pics/nes/gamename.jpg".
All good so far. But then it occurred to me I could shorten it further by putting a shortcut inside the ROMs folder. So I created one called nespics in
/home/pi/RetroPie/roms/nes
The text of the link is:
/opt/retropie/configs.hdmi/all/emulationstation/downloaded_images/nes
But if I type "/nespics/gamename.jpg" into the ES Image box the image doesn't show up, and I can't figure out what's changed. (I've tried prefixing it with various combinations of dots and slashes, to no effect.) Why does the first link work but the second, seemingly-identical, one not work?
(If I create a real folder called "images" inside the ROMs folder and put gamename.jpg in it and then type "/images/gamename.jpg" into the Images field in ES, that doesn't work either.)
-
Basically, I see what you mean when you made this thread.
But imho, your post looks quite unstructured, I have a hard time deciphering it, though I will give it a shot.so I created a shortcut called pics in /home/pi
So now if I'm adding art for, say, an NES game, I only have to type "/home/pi/pics/nes/gamename.jpg".
All good so far.So you type
"/home/pi/pics/nes/gamename.jpg"
and everything is ok.So I created one called nespics in /home/pi/RetroPie/roms/nes
The path would than be :
"/home/pi/RetroPie/roms/nes/nespics"
Check if you made the correct shortcut.But if I type "/nespics/gamename.jpg" into the ES Image box the image doesn't show up, and I can't figure out what's changed.
With your first try, that was OK, you typed :
"/home/pi/pics/nes/gamename.jpg"
Looks to me that you now have to type :
"/home/pi/RetroPie/roms/nes/nespics/gamename.jpg"
I've tried prefixing it with various combinations of dots and slashes, to no effect.
What you can type is, from what I remember, dependant on where you gamelist.xml is located.
This is how @DTEAM and I created our predefined gamelists.xml which, when downloaded from the add-mamedev-systems script, will put the gamelist.xml in, for example :
"/home/pi/RetroPie/roms/classich"
and we decided that we wanted the pictures to go into :
"/home/pi/RetroPie/roms/classich/media/emulationstation"
Then it's possible to use this sort of path in emulationstation or the gamelist.xml :
<image>./media/emulationstation/gamename.jpg</image>I just tested, if your gamelist.xml is still like this, for example :
"/opt/retropie/configs/all/emulationstation/gamelists/nes/gamelist.xml"
Then you should be able to use the same relative path :
"./media/emulationstation/gamename.jpg"
or you can use :
"/home/pi/RetroPie/roms/nes/media/emulationstation/gamename.jpg"
So translated to your gamelist it would be :
"./nespics/gamename.jpg"
or :
"/home/pi/RetroPie/roms/nes/nespics/gamename.jpg"My advice is to test both paths.
If the relative path doesn't work from within emulationstation then it could be that emulationstation thinks it is in a different path than the ~/RetroPie/roms/nes path.
That could explain it when it doesn't work. -
@JimmyFromTheBay
In the images folder you also want to add the suffix -image to your picture.So for example Abington (1988).jpg would be Abington (1988)-image.jpg.
Then make sure your rom name has exactly the same name as your picture and it will show up when you restart emulationstation.
If instead you use the folder roms/media/screenshots then you keep the file name exactly the same, e.g. Abington (1988).gif or Abington (1988).jpg.
You would then go to the game rom in emulationstation and edit metadata. Change, for example, the genre, which would edit the gamelist.xml to create an entry for the game. Then restart emulationstation.
You then also add the image information. You can edit it in metadata at the same time as the last step, but if you have many games it's easier in a terminal:
First, copy /home/pi/.emulationstation/gamelists/zxspectrum/gamelist.xml to /Retropie/roms/zxspectrum
(It will look for the file at the local location first)cd Retropie/roms/zxspectrum
sudo nano gamelist.xml
Then add a line within the game's info
<image>./media/screenshots/Abington (1988).jpg</image>(Using nano you can CTRL and K and CTRL and U to cut and paste from within the document or you can right click and paste which is a huge time-saver).
If you're doing using the metadata in emulationstation just add the image location to ./media/screenshots/mygame.jpg as above.
-
@Folly said in What am I doing wrong with shortcuts?:
So translated to your gamelist it would be :
"./nespics/gamename.jpg"
or :
"/home/pi/RetroPie/roms/nes/nespics/gamename.jpg"The second of those works, but the first one doesn't. This is what's confusing me. I don't understand why the absolute address isn't "translating" to the relative address. The dot before the slash SHOULD be telling it "start from where you are now", but it isn't.
-
@JimmyFromTheBay It does. The problem is that you don't know and can't guarantee what the 'current' directory is when it's running. That's likely why you need to make sure it starts at the top by using an absolute path.
-
Can you check what is saved in the gamelist.xml if you use the relative path ?
Might be that, when it is saved, it will work later in the menu of selecting a rom.
Just like @Thorr69 says, when you enter the relative path in emulationstation it's not in the menu of selecting a rom and therefor it could be that it uses a different directory at that particular moment and therefor the picture isn't found and displayed.
-
@Folly said in What am I doing wrong with shortcuts?:
Can you check what is saved in the gamelist.xml if you use the relative path ?
What gets saved by my current (working) method (typing /home/pi/pics/nes/gamename.jpg) is this:
<image>~/pics/nes/gamename.jpg</image>
The non-working method just saves exactly what I type into the box in EmulationStation, eg:
<image>./nespics/gamename.jpg</image>
Typing ~/nespics/gamename.jpg with the wibbly tilde symbol doesn't work either.
-
Typing ~/nespics/gamename.jpg with the wibbly tilde symbol doesn't work either.
( /home/pi = ~ )
And when you put the gamename.jpg in :
/home/pi/nespics/gamename.jpg
And use :
~/nespics/gamename.jpgDoes it work then ?
-
@Folly No.
-
I did some tests just like how you probably do it.
For me it works though I have to restart emulationstation when using ( I use a .png) :
./nespics/gamename.png (/home/pi/roms/nes/nespics/gamename.png)
~/nespics/gamename.png (/home/pi/nespics/gamename.png)Just as you say, when using :
/home/pi/nespics/gamename.png
Then it works directly without restarting emulationstation.Seems to me it's related to the "relative paths". For me it seems like an issue of emulationstation.
I have made some pics :
When using :
Or when using :
Nothing shows up after saving the metadata :
After a restart it shows up :
-
@Folly @JimmyFromTheBay It looks to me like there's a discrepancy between the two shortcuts, they don't look exactly the same to me, I think you need to add or remove a /nes/ or something like that.
-
@smartgenes said in What am I doing wrong with shortcuts?:
@Folly @JimmyFromTheBay It looks to me like there's a discrepancy between the two shortcuts, they don't look exactly the same to me, I think you need to add or remove a /nes/ or something like that.
Correct these are not the same, but @JimmyFromTheBay tested both options to see what worked, so I tested it too.
./nespics/gamename.png (= /home/pi/roms/nes/nespics/gamename.png)
~/nespics/gamename.png (= /home/pi/nespics/gamename.png) -
@Folly I mean, I think Jimmy's are not correct rather than yours, but it gets a bit mind-bending thinking of the links.
-
Could be, therefor I placed the pictures to try and simplify the problem.
Though the relative links are important here as @JimmyFromTheBay want's to type as little as possible. -
@Folly Hmm, nope, restarting ES after entering ~/nespics/gamename.jpg makes no difference for me. This is all most perplexing.
-
Very strange !
Can you post an output of an
ls
command, like this ?pi@raspberrypi:~ $ ls -l /home/pi/nespics/ total 24 -rw-r--r-- 1 pi pi 23528 Sep 1 15:19 gamename.png
-
@Folly I also tried putting the JPG inside the images folder inside the roms folder (ie it's in roms/nes/images, no shortcuts involved) and typing ~/images/gamename.jpg still doesn't work, with or without a restart.
-
@Folly said in What am I doing wrong with shortcuts?:
Very strange !
Can you post an output of an
ls
command, like this ?pi@raspberrypi:~ $ ls -l /home/pi/nespics/ total 24 -rw-r--r-- 1 pi pi 23528 Sep 1 15:19 gamename.png
I don't even know where to type that :D
-
We tried, looks like we are on a dead end.
I even used a linked directory now :
/home/pi/nespics (link to /opt/retropie/configs/all/emulationstation/downloaded_images/nes )
That work too for me.How is it going when you edit the gamelist.xml directly ?
-
@JimmyFromTheBay Try adding -image.jpg instead to your non-link example in the sub folder images and see if that works.
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.