RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    [SOFT] New Scraper in the works

    Scheduled Pinned Locked Moved Projects and Themes
    scrapingscrappersoftware
    253 Posts 7 Posters 60.1k 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.
    • F
      Folly
      last edited by Folly

      @kiro

      By default the backup function doesn't work anymore, so you should look at this.

      I did a test with placing the megaplay roms directory inside playchoice10.
      Then the subfolder isn't scanned/detected.

      Will do a second test with a subfolder.
      Placed some playchoice10 files in a subfolder and indeed they aren't detected.

      kiroK 1 Reply Last reply Reply Quote 0
      • kiroK
        kiro @Folly
        last edited by kiro

        @Folly Will check on the default backup issue.... and will put the subfolders in my todo list :-)

        backup should be ok now...(it was a matter of the logic being inverted)

        F 1 Reply Last reply Reply Quote 0
        • F
          Folly @kiro
          last edited by

          @kiro

          By default backing up gamelist.xml works again.
          Tested the --nobackup function and that works too.

          kiroK 1 Reply Last reply Reply Quote 0
          • kiroK
            kiro @Folly
            last edited by

            @Folly thanks! Yes the double negative logic just screwed with my brain...

            F 1 Reply Last reply Reply Quote 0
            • F
              Folly @kiro
              last edited by

              @kiro

              Haha, Yes I can imagine.

              kiroK 1 Reply Last reply Reply Quote 0
              • kiroK
                kiro @Folly
                last edited by kiro

                @Folly Hi Again! I'm trying the subfolders, and it is somehow working, except that I have a starnge behaviour from emulationstation:

                This is a snippet of the created gamelist:

                        <game>
                                <rating></rating>
                                <name>3d Asteroids</name>
                                <marquee>./marquees/3D Asteroids (1987) (Atari) (Prototype) [a1].png</marquee>
                                <image>./images/3D Asteroids (1987) (Atari) (Prototype) [a1].png</image>
                                <publisher></publisher>
                                <releasedate></releasedate>
                                <players></players>
                                <video>./videos/3D Asteroids (1987) (Atari) (Prototype) [a1].mp4</video>
                                <genre></genre>
                                <path>./myroms/3D Asteroids (1987) (Atari) (Prototype) [a1].zip</path>
                                <developer></developer>
                                <thumbnail/>
                                <desc>This is an unencrypted pre-release version of the game that became Asteroids for the 7800.</desc>
                                <playcount>0</playcount>
                                <lastplayed>0</lastplayed>
                        </game>
                

                So roms in subfolders are detected and integrated into the gamelist, even in relative mode.

                BUT, see emulationstation:

                7c633f36-eb9c-423d-8791-6fdf7d051295-image.png

                and when I enter the 'myroms' subfolder:

                8ae229e9-4e54-4f5e-8265-47fbc9536769-image.png

                Is this the expected behavior from emulationstation?

                (same behaviour when using absolute paths)

                Anyway, just added the --recursive flag that will do exactly that, recurse over subfolders in the systems path. Let me know when you have a chance to test it. I do not know how to remove those subpaths in emualtionstation menu though.

                F 1 Reply Last reply Reply Quote 0
                • F
                  Folly @kiro
                  last edited by

                  @kiro

                  Nice ;-)

                  Yes, it works with and without the option --relativepaths.
                  Though I am missing that the script will not display what's being recognised.

                  The subfolder behaviour is expected.
                  Subfolders are shown when they contain roms.
                  Dependant on the theme they are mostly showing up as gray text in emulationstation.
                  Obviously such folder has to be there otherwise you can not select a rom from a subfolder.
                  As far as I know it's possible to add media to a folder just like it's done with files but for the folder no media has been added in the gamelist.xml now.

                  kiroK 1 Reply Last reply Reply Quote 0
                  • kiroK
                    kiro @Folly
                    last edited by

                    @Folly said in [SOFT] New Scraper in the works:

                    Though I am missing that the script will not display what's being recognised.

                    What do you mean by this?

                    F 1 Reply Last reply Reply Quote 0
                    • F
                      Folly @kiro
                      last edited by Folly

                      @kiro

                      As test 1 placed 1 rom in the roms folder en 1 in a subfolder called sub :

                      pi@Bullseye-VM:~/RetroPie/roms/playchoice10$ find *
                      pc_1942.zip
                      sub
                      sub/pc_bball.zip
                      

                      I would expect that the name of 1942 and bball are shown as usual.
                      Though they are missing in the output of the scan :

                      pi@Bullseye-VM:~/retroscraper-rpie$ python3 retroscraper.py --systems playchoice10 --recursive --relativepaths
                      Starting retroscraper - be Patient :-)
                      Starting retroscraper - be Patient :-)
                      Loading RetroScraper config File
                      Loading systems from Backend
                      Scanning Systems ['playchoice10']
                      Loading companies from backend
                      Starting scraping
                      Scanning Files
                      SCANNING DIRECTORY
                      SCRAPPING ENDED --- Thank you for using retroscraper!!
                      

                      This is shown with a normal scan with both in roms directory :

                      Game : 1942 (playchoice-10)
                      Game : Baseball (playchoice-10)
                      
                      1 Reply Last reply Reply Quote 0
                      • kiroK
                        kiro
                        last edited by kiro

                        Hmmmm strange, le me try that.. cannot replicate that... is the rom you copied actually with an accepted extension (I would assume yes, but just trying to understand)

                        I did some tests:

                        /home/pi/retroscraper-rpie/retroscraper.py --systems ags --bezels --sysbezels --relative --recursive 
                        Starting retroscraper - be Patient :-)
                        Starting retroscraper - be Patient :-)
                        Loading RetroScraper config File
                        Loading systems from Backend
                        Scanning Systems ['ags']
                        Loading companies from backend
                        Starting scraping
                        Scanning Files
                        SCANNING DIRECTORY
                        Game : test.zip
                        WRITING GAMELIST
                        SCRAPPING ENDED --- Thank you for using retroscraper
                        
                        F 1 Reply Last reply Reply Quote 0
                        • F
                          Folly @kiro
                          last edited by Folly

                          @kiro said in [SOFT] New Scraper in the works:

                          --relative

                          Can I now use --relative instead of --relativepaths ?

                          --recursive

                          Removing this option and detected roms in the roms folder are shown again.

                          Very strange that you don't experience this behaviour.

                          kiroK 1 Reply Last reply Reply Quote 0
                          • kiroK
                            kiro @Folly
                            last edited by kiro

                            @Folly :-) I should've put --relativepaths, good sight !

                            Anyway , I tried one rom in system path, one rom in subfolder and one rom in both, and it seems to work?

                            I'll see if the git version is the latest one...it is... hmmm can you try --debug and see if something shows up?

                            F 2 Replies Last reply Reply Quote 0
                            • F
                              Folly @kiro
                              last edited by Folly

                              @kiro

                              I updated the script on my pi4 and it worked correctly showing the games in the script output when using a subfolder.

                              I did the same on my VM.
                              The first time it did not display the games when using a subfolder.
                              The next tries were always successful so I can't reproduce the error any more so I can't use --debug anymore.
                              I had a generated file from my script 0 rom-index 0 in the roms folder, this could have had some influence, but moving it back and it still worked fine so I doubt it.

                              Let's say it's solved for now.
                              If it comes back again we can have a second look.

                              Btw. the pc_mario.mp4 works as expected on the pi4 ;-) (video and sound OK)

                              1 Reply Last reply Reply Quote 0
                              • F
                                Folly @kiro
                                last edited by Folly

                                @kiro

                                Hi,

                                Here you can read about using folders in gamelists using descriptions and media :
                                https://github.com/RetroPie/EmulationStation/blob/master/GAMELISTS.md

                                I did a quick test and it's not only restricted to :

                                • name - string, the displayed name for the folder.
                                • desc - string, the description for the folder.
                                • image - image_path, the path to an image to display for the folder.
                                • thumbnail - image_path, the path to a smaller image to display for the folder.

                                Quick example :

                                <folder>
                                		<rating></rating>
                                		<name>subfolder</name>
                                		<marquee>./marquees/pc_1942.png</marquee>
                                		<image>./images/pc_1942.png</image>
                                		<video>./videos/pc_mario.mp4</video>
                                		<path>./more</path>
                                		<thumbnail/>
                                		<desc>description</desc>
                                </folder>
                                

                                Looks like this :
                                2022-11-16-192059_1600x900_scrot_resized.png

                                kiroK 1 Reply Last reply Reply Quote 0
                                • kiroK
                                  kiro @Folly
                                  last edited by

                                  @Folly thanks for that, although I'm not sure what would be the use for that in an automatic scraping... I mean, the folder tag could be created automatically, but what about description and image and the rest? Fill this info based on what exactly? Something to think about...

                                  F 2 Replies Last reply Reply Quote 0
                                  • F
                                    Folly @kiro
                                    last edited by

                                    @kiro

                                    I agree, it's not something to implement directly into the script.
                                    I only mention it because you questioned why a folder looked the way it did.
                                    So it's only for the knowledge.

                                    1 Reply Last reply Reply Quote 0
                                    • F
                                      Folly @kiro
                                      last edited by

                                      @kiro

                                      Just want to say :
                                      I really appreciate the effort you putting in it.
                                      Keep up the good work ;-)

                                      kiroK 2 Replies Last reply Reply Quote 0
                                      • kiroK
                                        kiro @Folly
                                        last edited by

                                        @Folly Thanks, this is just my way to give back something to the retro community for all the fun over the years! even if it is just a silly scraper :-)

                                        1 Reply Last reply Reply Quote 0
                                        • kiroK
                                          kiro @Folly
                                          last edited by

                                          @Folly just wanted to give you a quick update, I'm still in the process of converting problematic videos, not easy with over 40k to go over (even being a script), will keep you posted. Take care!

                                          F 1 Reply Last reply Reply Quote 1
                                          • F
                                            Folly @kiro
                                            last edited by

                                            @kiro

                                            That's quite a lot.
                                            How long does it take, do you think.
                                            Just curious.

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