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

    Multi-level absolute paths in gamelist.xml not working

    Scheduled Pinned Locked Moved Help and Support
    gamelist.xml
    10 Posts 5 Posters 836 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.
    • johnodonJ
      johnodon
      last edited by johnodon

      I'm reorganizing my data structures and have created new rom folders and systems that are very emulator specific (i.e. arcade_daphne, arcade_lr-mame, etc.). I have also created new ~/RetroPie/media folder to store images/videos (i.e. ~/RetroPie/media/arcade_daphne/video) and shared it out via SMB.

      Can anyone tell me why the media paths below (image, video and marquee) are not working? This is driving me goofy. Is there something wrong that I am just not seeing?

      In the example below, the rom path is ~/RetroPie/roms/arcade_daphne/ace.daphne and the video media path is ~/RetroPie/media/arcade_daphne/video/ace.mp4.

      	<game id="51173" source="ScreenScraper.fr">
      		<path>./ace.daphne</path>
      		<name>Space Ace</name>
      		<desc>Space Ace is a laserdisc video game produced by Don Bluth Studios, Cinematronics and Advanced Microcomputer Systems (later renamed RDI Video Systems). It was unveiled in October 1983, just four months after the Dragon's Lair game, then released in Spring 1984, and like its predecessor featured film-quality animation played back from a laserdisc.
      
      The gameplay is also similar, requiring the player to move the joystick or press the fire button at key moments in the animated sequences to govern the hero's actions. However, the game's action was more varied with the player occasionally given the temporary option to either have the character he is controlling transform back into his adult form, or remain as a boy with different styles of challenges.</desc>
      		<rating>0.9</rating>
      		<releasedate>19840424T000000</releasedate>
      		<developer>Advanced Microcomputer Systems</developer>
      		<publisher>Cinematronics</publisher>
      		<genre>Platform / Run Jump-Platform-Action</genre>
      		<players>1</players>
      		<image>../../media/arcade_daphne/screenshot/ace.png</image>
      		<marquee>../../media/arcade_daphne/logo/ace.png</marquee>
      		<video>../../media/arcade_daphne/video/ace.mp4</video>
      		<genreid>257</genreid>
      	</game>
      
      /home/pi/RetroPie/media
      /home/pi/RetroPie/media/arcade_daphne
      /home/pi/RetroPie/media/arcade_daphne/screenshot
      /home/pi/RetroPie/media/arcade_daphne/screenshot/lair.png
      /home/pi/RetroPie/media/arcade_daphne/screenshot/ace.png
      /home/pi/RetroPie/media/arcade_daphne/video
      /home/pi/RetroPie/media/arcade_daphne/video/lair.mp4
      /home/pi/RetroPie/media/arcade_daphne/video/ace.mp4
      /home/pi/RetroPie/media/arcade_daphne/logo
      /home/pi/RetroPie/media/arcade_daphne/logo/lair.png
      /home/pi/RetroPie/media/arcade_daphne/logo/ace.png
      
      
      /home/pi/RetroPie/roms/arcade_daphne
      /home/pi/RetroPie/roms/arcade_daphne/gamelist.xml
      /home/pi/RetroPie/roms/arcade_daphne/lair.daphne
      /home/pi/RetroPie/roms/arcade_daphne/lair.daphne/lair.m2v
      /home/pi/RetroPie/roms/arcade_daphne/lair.daphne/lair.txt
      /home/pi/RetroPie/roms/arcade_daphne/lair.daphne/lair.ogg
      /home/pi/RetroPie/roms/arcade_daphne/lair.daphne/lair.dat
      /home/pi/RetroPie/roms/arcade_daphne/roms
      /home/pi/RetroPie/roms/arcade_daphne/roms/ace.zip
      /home/pi/RetroPie/roms/arcade_daphne/roms/lair.zip
      /home/pi/RetroPie/roms/arcade_daphne/ace.daphne
      /home/pi/RetroPie/roms/arcade_daphne/ace.daphne/ace.dat
      /home/pi/RetroPie/roms/arcade_daphne/ace.daphne/ace.ogg
      /home/pi/RetroPie/roms/arcade_daphne/ace.daphne/ace.m2v
      /home/pi/RetroPie/roms/arcade_daphne/ace.daphne/ace.txt
      
      1 Reply Last reply Reply Quote 0
      • S
        sleve_mcdichael
        last edited by

        Tried using full paths? My gamelists have ./ for rom paths, but only ~/ and /home/ for the media files; I don't see any ../ anywhere.

        johnodonJ 1 Reply Last reply Reply Quote 0
        • johnodonJ
          johnodon @sleve_mcdichael
          last edited by

          @sleve_mcdichael said in Media tags in gamelist.xml not working:

          Tried using full paths? My gamelists have ./ for rom paths, but only ~/ and /home/ for the media files; I don't see any ../ anywhere.

          That works but the scraper I am using (Skraper) is using absolute paths. I would need to find/replace after every scrape.

          1 Reply Last reply Reply Quote 0
          • S
            sleve_mcdichael
            last edited by sleve_mcdichael

            @johnodon said in Media tags in gamelist.xml not working:

            (Skraper)

            Is it just me, or is that software somewhat of a "black box"? I can find zero documentation on the website, besides "it's so good, just use it." Is there somewhere that actually describes, you know, how?

            Lister of SmegL 1 Reply Last reply Reply Quote 1
            • Lister of SmegL
              Lister of Smeg @sleve_mcdichael
              last edited by Lister of Smeg

              @sleve_mcdichael
              yup - the release notes claim "Documentation is only available in french - Use google translator until the english version is available" . . . I can't even find that??
              I've found it useful - but I just leave it with the default setting '%ROMROOTFOLDER%\media\images' - not sure what to use for samba but I feel like it should have an ip address in there somewhere (if I understand the op correctly)
              *edit - got it now / thought you were using a network drive
              can't see why that doesn't work

              @johnodon
              at the bottom of https://www.skraper.net there are links for discord and irc - maybe someone there can help?

              1 Reply Last reply Reply Quote 0
              • S
                sleve_mcdichael
                last edited by sleve_mcdichael

                I thought it might be because of the files' location being outside of certain allowable path(s), but it seems it's not that. I've just tried this in my arcade gamelist, and the absolute path works regardless of where the file is kept, while relative paths to media files do not seem to work at all:

                I copied my ~/.emulationstation/downloaded_media folder to ~/RetroPie/media. Changed the game "path" from /home/pi/[...] to just ./1942.zip to ensure the "starting line" was in the correct place (roms/arcade). Then I tried various paths for the video file, going back to ES each time to see if it was correctly displayed:

                <video>../../media/arcade/videos/1942.mp4</video> did not work.

                <video>~/RetroPie/media/arcade/videos/1942.mp4</video> did work.

                Pointing back to my original folder in .emulationstation:

                <video>../../../.emulationstation/downloaded_media/arcade/videos/1942.mp4</video> did not work.

                <video>~/.emulationstation/downloaded_media/arcade/videos/1942.mp4</video> (the original setting) did work.

                So it seems it's really about the relative vs. absolute paths. If you can't change Skraper's output format, you might have to use a different scraper. I recommend Skyscraper, available through the RetroPie Setup script under "optional packages." That's what I've been using and it works very well, is highly configurable, & well-documented (in English.)

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @sleve_mcdichael
                  last edited by

                  <video>../../media/arcade/videos/1942.mp4</video> did not work.

                  Looks like a bug in the patch canonicalisation in EmulationStation.

                  LolonoisL 1 Reply Last reply Reply Quote 1
                  • LolonoisL
                    Lolonois @mitu
                    last edited by

                    Well, this use case @johnodon has not been anticipated and the current implementation is geared to the sunny-day (="usual") output the most scrapers provide by default, the method in question is unchanged since early 2018.

                    However from a "what-a-user-expects" (or "do-not-surprise-the-user") perspective, it should be possible to pass in paths like ../a/b/c or a/b/c and get a absolute path in return (e.g. /home/pi/RetroPie/roms/<system>/../a/b/c.

                    A few lines in the before mentioned method would remediate the situation:

                    diff --git a/es-core/src/utils/FileSystemUtil.cpp b/es-core/src/utils/FileSystemUtil.cpp
                    index 4a02854..391394d 100644
                    --- a/es-core/src/utils/FileSystemUtil.cpp
                    +++ b/es-core/src/utils/FileSystemUtil.cpp
                    @@ -505,8 +505,12 @@ namespace Utils
                                            if(_allowHome && (path[0] == '~') && (path[1] == '/'))
                                                    return (getHomePath() + &(path[1]));
                     
                    -                       // nothing to resolve
                    -                       return path;
                    +                       // absolute path
                    +                       if(path[0] == '/')
                    +                               return path;
                    +
                    +                       // concatenate paths
                    +                       return (relativeTo + '/' + path);
                     
                                    } // resolveRelativePath
                    
                    johnodonJ 1 Reply Last reply Reply Quote 1
                    • johnodonJ
                      johnodon @Lolonois
                      last edited by

                      @lolonois said in Media tags in gamelist.xml not working:

                      Awesome! Thanks @Lolonois. I've updated the subject to more accurately reflect the issue. I'll leave it to @mitu and team to see how they would like to proceed (if at all).

                      John

                      johnodonJ 1 Reply Last reply Reply Quote 0
                      • johnodonJ
                        johnodon @johnodon
                        last edited by johnodon

                        @johnodon PR created: https://github.com/RetroPie/EmulationStation/pull/767

                        1 Reply Last reply Reply Quote 0
                        • 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.