Forum Replies Created
-
AuthorPosts
-
jamiem777
ParticipantThat’s great thanks Sselph. I will try this out and let you know how I get on.
jamiem777
ParticipantThanks Sselph, The first post has helped me I was able to run the script and it worked perfectly apart from the gamelist.xml doesnt appear to get updated until after exiting emulation station so it really makes that method of searching rather redundant now. I am now trying to incorporate the details from your second post how would I go about passing the $command into my script. I should be able to work out how to fix it up so that I can get the right details out of it just I haven’t got an idea where to start with this. Here’s my code so far.
from AndyPi_LCD import AndyPi_LCD import lxml.etree as ET root = ET.parse("./RetroPie/roms/ports/gamelist.xml") lsp = root.findall(".//lastplayed") mylist = [t.text for t in lsp] newest = max(mylist) gname = root.xpath("./game[lastplayed/text()='{}']/name/text()".format(newest)) print(gname) namelcd = "".join(gname) print(namelcd) lcd=AndyPi_LCD() lcd.lcd_init() lcd.led(512) lcd.static_text(1,"c","Latest Game:") lcd.static_text(2,"c",namelcd)jamiem777
ParticipantHi Nharka did you have any luck with getting the currently played game to display on your LCD. I am looking to build something similar and I’m trying to work out parsing the xml file on gameslist.xml to get the rom title, I’ve got a few ideas to try when I finish work but if you have managed to succed in this if you wouldnt mind sharing how you did it
Thanks
Jamie
-
AuthorPosts