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

    METADATA not saving - Favorites will never remain tagged

    Scheduled Pinned Locked Moved Help and Support
    nespi casemetadata issuesfavoritesshutdown scriptgameslist.xml
    121 Posts 7 Posters 18.8k 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
      last edited by

      Well I don't know why this is don't running.
      Did you have raspi-gpio installed?

      Please do so with sudo apt install raspi-gpio

      Then cd /home/pi/RetroPie/scripts

      Then wget https://raw.githubusercontent.com/crcerror/ES-generic-shutdown/master/multi_switch.sh && chmod +x multi_switch.sh

      Then run the scripts via SSH
      ./multi_switch.sh --nespicase &

      You don't need sudo, you don't need the bash interpreter to call, all automatic done ;)

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

        @cyperghost I think there is an unmatched single quote' in the script text above, or maybe a " that should be a ' in the emucall. See how the comment # Handle calls and send TERM signal is the wrong color? Something is not right in one of the commands above that.

        My 4-player cocktail style cabinet built as a custom "roadcase"

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

          @caver01 No the script is working ;)
          But raspi-gpio is not installed ;) As command is not found
          The ticks are taken from the original script.

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

            @cyperghost Ok, fair enough, but you see how the colors are messed up before that comment, right?

            My 4-player cocktail style cabinet built as a custom "roadcase"

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

              Oh... No I get you ;)

              We are talking about this one here

              The other script was just for testing purposes if I understand the logic of the NESPICase mod done by @Yahmez

              By the way..... BASH is also capable of handling the pullup resistors.
              That's very nice, becasue now you just connect the switch with an GPIO to GROUND!

              raspi-gpio set YOURGPIONr ip pu sets up internal pull up resistor
              Now the PULLUP is setted 1 if it's not connected to ground
              Press the button and connect to ground and the pull is set to 0

              the logic

              until [[ $power == 0 ]]; do
              power=$(raspi-gpio get $GPIO_powerswitch | grep -c "level=1 fsel=0 func=INPUT")
              done
              
              caver01C 1 Reply Last reply Reply Quote 0
              • caver01C
                caver01 @cyperghost
                last edited by

                @cyperghost Oh. Ok. Wow. That thing is getting pretty huge. I need to dig into this a bit. I like where things are going.

                My 4-player cocktail style cabinet built as a custom "roadcase"

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

                  @caver01 Yes I posted a comment above

                  but I like also to use the command line parameters

                  --es-pid shows PID of ES binary, if ES isn't running then it's 0
                  --rc-pid shows PID of runcoomand, if no runcommand (=emulator) is running then it's 0

                  kind of swiss knife

                  1 Reply Last reply Reply Quote 0
                  • S
                    Semper 5
                    last edited by

                    @cyperghost ok we're back to having power button functionality but no metadata saving. I was able to quickly catch it complaining about the gameslist.xml:

                    here's my ES log

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

                      @semper-5 Set "Save Gamelist on exit" in ES
                      It's found in MainMenu > Other Settings > Save Metadata on exit (ON)

                      That's a bit curious, because the scripts save metadata for me. In every usecase now (okay didn't scraped tons of emualtors but I see last played games and last accessed game)

                      Furthermore, does the reset button works?

                      If you are in ES main screen and press reset ... it will reload ES (NOT REBOOT!)
                      if you have an emulator running it will bring you back to ES main screen

                      EDIT:
                      I release the next version in a short time
                      I added ... check user priviliges (if you need root and aren't using sudo, It will stop the script)
                      I added ... check raspi-gpio package (If not installed, then print error message, and stop the script)

                      1 Reply Last reply Reply Quote 0
                      • S
                        Semper 5
                        last edited by

                        @cyperghost yup I checked the Save Metadata on Exit. And the buttons all work great and exactly as you described.

                        I'm just stumped why I'm getting these lines of errors AGAIN :(
                        I seriously starting to think I'm cursed or something.

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

                          @semper-5 I upgraded script with packages check and user priviliges.
                          If you want to upgrade remove old script with rm multi_switch.sh before using wget!
                          But this won't help you in your issue now.
                          Is the metadata is saved on regular exit via main menu?

                          I'm starting to integrate the NESPi+ for this script!

                          EDIT:
                          Even with scraping games, setted to favourites and run the game
                          Then called script via ./multi-switch.sh --es-poweroff
                          My scraped data was not removed, game was found in favorites and it was marked as last accesed ;)

                          So everything is fine!

                          S 1 Reply Last reply Reply Quote 1
                          • S
                            Semper 5 @cyperghost
                            last edited by

                            @cyperghost ok I had to wipe everything and start from a fresh image again. that fixed those weird errors with the XMLs.

                            Power button: works
                            Reset button: works
                            Tag favorite games: works
                            Remove tags: doesn't work

                            so the only little snag is that you can add favorites but you can never remove them. for some reason ES doesn't unmark/delete the favorites attribute in the gamelist.XML

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

                              @semper-5 That seems to be a bug in ES itself! I'm using an older version and I can remove the Favourite-tag and it will still be removed after reboot/poweroff done with script

                              S 1 Reply Last reply Reply Quote 0
                              • S
                                Semper 5 @cyperghost
                                last edited by

                                @cyperghost ok I figured it out :)
                                it's a little bit of a bug but totally fixable.

                                ES uses both gamelist.xml found at /opt/retropie/configs/all/emulationstation/gamelists/"console"/ and /home/pi/RetroPie/roms/"console"/

                                so if there's no gamelist.xml in the console folder under roms, it will use the one found in configs. for some reason it doesn't remove entries, only adds them.

                                it will also not untag favorites if you DO have a gamelist.xml in your roms but DON'T have an entry in your gamelist.xml for the tagged favorite game.

                                Best word of advice: scrape like you've never scraped before lol

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