2004-04-22, 08:45
i want to know how do i go about getting info stored in an xbe when a dvd is inserted?
how do i extract the title and logo image of a game?
how do i extract the title and logo image of a game?
Quote:import xbmc, xbmcgui, os
disc_present = 96 # xbmc.tray_closed_media_present
dvd_dir = "d:\\" # the dvd drive base directory.
class xbeparser:
textfile = open("e:\gametitle.txt", "a+") # create a text file to output data to (a.k.a - log file).
if xbmc.getdvdstate() == disc_present: #if a disc is in the dvd dive then execute code below.
openedxbe = open("d:\\default.xbe", "rb")
openedxbe.seek(384, 0)
textfile.write(openedxbe.read(80) + "\n")
openedxbe.close() # never forget to close a file you opened.
textfile.close() # never forget to close a file you opened.
x = xbeparser() # call the class so that the code can be run.
del x