METADATA not saving - Favorites will never remain tagged
-
@cyperghost I had a chance to update the script to its entirety from your thread and using your parameters, but unfortunately I'm set back a bit.
I ran the script with its parameter in SSH and it was complaining about not finding commands, but with executing it, it immediately starts a shutdown command and does not keep any favorites tagged. It's a good thing I didn't put it into the autostart.sh or else it'd probably start up and shutdown as soon as ES was loaded.
-
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 ;)
-
@cyperghost I think there is an unmatched single quote
'
in the script text above, or maybe a"
that should be a'
in theemucall
. 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. -
@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. -
@cyperghost Ok, fair enough, but you see how the colors are messed up before that comment, right?
-
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 0the logic
until [[ $power == 0 ]]; do power=$(raspi-gpio get $GPIO_powerswitch | grep -c "level=1 fsel=0 func=INPUT") done
-
@cyperghost Oh. Ok. Wow. That thing is getting pretty huge. I need to dig into this a bit. I like where things are going.
-
@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 0kind of swiss knife
-
@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:
-
@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 screenEDIT:
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) -
@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. -
@semper-5 I upgraded script with packages check and user priviliges.
If you want to upgrade remove old script withrm multi_switch.sh
before usingwget
!
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!
-
@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 workso 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
-
@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
-
@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
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.