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

    BashROMManager - Delete ROMs with your gamepad!

    Scheduled Pinned Locked Moved Ideas and Development
    cyperghostbashdeleterom
    20 Posts 5 Posters 5.2k 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.
    • cyperghostC
      cyperghost @Sano
      last edited by

      @sano said in BashROMManager - Delete ROMs with your gamepad!:

      Nice job (even if I prefer a ssh shell) :)

      Yes or the Midnight Commander - but it's a pitty you don't have the possibility to remove some ROMs just with a controller. With a keyboard or via SSH-terminal you are 1000x times faster ;)

      To be as efficient as possible, maybe you could integrate (or launch afterward) @meleu cleanup scripts ?
      This way gamelists.xml files would be cleaned, and images and videos deleted as well.

      Well you are talking about being more efficinet with SSH ... ;)
      That's only possible with annother selection screen or textbox. It's a pitty you don't have "Space-key" within your controller to make radio buttons or selections lists work. That's the reason why I did that route with menu lists and counting items. But it works fast enough with an array that includes 2x 2500 entries (ARCADE system).

      But I've removed the FileManager within retropiemenu and replaced it with this script. This way is more usefull if you don't have a keyboard available! I also tried dialog --fselect but this option isn't good to handle with the limited key resources a gamepad input offers ;)

      So this script is (imho) a good replacement to work as little ROM-Maid ;)

      img

      SanoS 1 Reply Last reply Reply Quote 1
      • SanoS
        Sano
        last edited by

        And a simple confirmation screen before deleting ?
        Do you want to also delete images, video and gamelist entries for the selected roms ? Yes/No

        cyperghostC 1 Reply Last reply Reply Quote 1
        • SanoS
          Sano @cyperghost
          last edited by Sano

          Well you are talking about being more efficinet with SSH ... ;)

          Ok, here you got me at least for gamelist cleanup, images/videos are simply handled with a one-liner ;)

          1 Reply Last reply Reply Quote 1
          • cyperghostC
            cyperghost @Sano
            last edited by cyperghost

            @sano said in BashROMManager - Delete ROMs with your gamepad!:

            And a simple confirmation screen before deleting ?
            Do you want to also delete images, video and gamelist entries for the selected roms ? Yes/No

            Simple simple simple ;)
            Nothing is simple if you want a generic solution. Savegames are not always stored in ROMs directory. You can use this little script, from me to change SRM and SAVESTATE location for every system on the run ;) Works also nice as I now have folder %HOME%/RetroPie/savegames/$system symlinked to a USB drive.

            But you can investigate that script and see that it needs savegame pathes and system description. This can't be offered by a simple call by retropiemenu ;)

            1 Reply Last reply Reply Quote 2
            • SanoS
              Sano
              last edited by Sano

              Simple for the user of course ;)

              I didn't talk about savegames but images and videos (potentially more space eating) are quite easy to find.

              An example for the image path of $rom on $system :
              xmlstarlet sel -T -t -c /gameList/game[path=\"$rom\"]/image -n .emulationstation/gamelists/$system/gamelist.xml

              cyperghostC 1 Reply Last reply Reply Quote 1
              • cyperghostC
                cyperghost @Sano
                last edited by

                @sano Oh sorry ;)
                I do not use any scraper! So I'm not familiar with this. But it's no problem to expand the path the way you want....
                But SSH connection is the preferable solution here ;)

                1 Reply Last reply Reply Quote 0
                • cyperghostC
                  cyperghost
                  last edited by

                  v 0.51 released

                  Just some cosmetic effects

                  • Better Handling of SUBDirectories
                  • Resolved error that let's only select 9 items
                  • MsgBox for wrong setted pathes
                  • ....

                  Enjoy

                  cyperghostC 1 Reply Last reply Reply Quote 0
                  • cyperghostC
                    cyperghost @cyperghost
                    last edited by cyperghost

                    @cyperghost
                    v.061 and v.077 are realeased

                    Some cosmetic effects.
                    We have now a 4 button layout
                    Button 1 selects game to delete or removes them from delte queue
                    Button 2 is the fast forward button
                    Button 3 jumps back to system selection
                    Button 4 is the begins the erase from queue

                    Now wen can jump through gamelists
                    The jump is calculated in depence of total entries of system

                    So if a system contains 1000 Roms, then one jump is 100 entries
                    Is it 100 roms then the jump is just 10 entries....

                    If we reach the maximum of entries and select further FAST FORWARD then we will be set to first entry again!

                    So the navigation through systems with massive entries is much much faster (faster then in ES!)

                    So I think a 1.0 release isn't far away ;)
                    So please report bugs and errors
                    Send some PR if you want

                    v.077

                    Used FastForward two times and rushed 20% of gamelist
                    img

                    cyperghostC 1 Reply Last reply Reply Quote 0
                    • cyperghostC
                      cyperghost @cyperghost
                      last edited by

                      v0.81 available

                      Added "load now message...."
                      Some code cleanup ans small fixes

                      cyperghostC 1 Reply Last reply Reply Quote 0
                      • cyperghostC
                        cyperghost @cyperghost
                        last edited by cyperghost

                        v0.82 available

                        System are now listed even if they contain empty subdirectories

                        1 Reply Last reply Reply Quote 0
                        • BenMcLeanB
                          BenMcLean
                          last edited by

                          Wow this is helpful. The main thing I'm wanting to do is delete incorrect metadata from the gamepad though, not the actual ROMs.

                          cyperghostC 1 Reply Last reply Reply Quote 0
                          • cyperghostC
                            cyperghost @BenMcLean
                            last edited by cyperghost

                            @benmclean Well take a look at @meleu's GameList Cleaner via github.

                            I think I can push the ROMManager to v0.82+x
                            and then give output from system selection and the array that deleted the roms straight to meleus script ;)

                            But I think then both programs must be a bit modified to work with. So you can clean your gamelists (and clean your ROMs as optional selection)

                            You can avoid to remove the files simply by working in the del_files function by just removing the rm -f "$e" command. But this is a dirty hack and I think it would be cleaner to remove ROM+GameList entry

                            AND later to remove MAYBE the video and picture preview ;) But I think that meleu is better for that task as he is more advanced in using xmlstarlet

                            cyperghostC 1 Reply Last reply Reply Quote 1
                            • cyperghostC
                              cyperghost @cyperghost
                              last edited by cyperghost

                              @meleu @Kaltinril I took a bit of action how the cleaner scripts (image and gamelist) work in general.

                              @all users
                              First thing that stops me from integrating a picture/video remover into the BashROMManager is that there in no evidence that every user got the same file strategy.
                              Second: Time shedule!

                              I tested these two wonderfull tools on my mashine and they work fine! I was able to remove entries from gamelists - after I removed some ROM files. So I these fine tools are working. But I think the responsibility is to much to remove files and work with fragile xml lists in a "automated" ROM deletion process. Please don't think the scripts are not working or the ROMManager itself is the culprit ... No! I simple have no time for extensive trouble shooting!

                              Here is the link to the image-cleaner script powered by meleu, kaltinril and sano
                              Here is the link to the gamelist-cleaner script powered by meleu and kaltinril

                              I think a chance that I step into integrating this is, if I start to scrape all my ROMs ;) I didn't do that the last 2.5 years so you can calculate if I do this in future. I think I will integrate a "log-file" of deleted rom-files into the BashROMManager and maybe a help section how the cleaner tools should be feed manual.....

                              Nevertheless if there is a strong demand maybe @Sano @hiulit @meleu @mitu and others can (if these nice guys got time) help to integrate. My github resporitory is open for everyone...

                              I deeply hope, that all these scraper things will be setted in per system SQLite databases once a time. Then it will also be easier to maintain and share such things. So we have a database, were all our roms get one hash string. The hash points to metadata. As long the hash value is in the database the ROM does excitst. To renew the database we have to renew all hash values ;)

                              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.