2009-11-22, 02:32
Another useful patch for those of you that have thumbs in the rom path.
like this
This patch will look for thumbs while importing roms.
To apply just open "XBMC\plugins\Programs\Launcher\resources\lib\launcher_plugin.py"
insert at end of file
search
change to
and save the file
now delete "XBMC\plugins\Programs\Launcher\resources\lib\launcher_plugin.pyo".
Now try to import roms if the thumbs do not show up you probably need to remove the launcher first and add it again.
Tested with Launcher 1.04 and XBMC 9.11-a2 on WinXP64
like this
Code:
GreatGame.rom
GreatGame.png
AnotherGreatGame.rom
AnotherGreatGame.jpg
This patch will look for thumbs while importing roms.
To apply just open "XBMC\plugins\Programs\Launcher\resources\lib\launcher_plugin.py"
insert at end of file
PHP Code:
def _get_local_thumb( self, filename ):
exts = ['jpg', 'png', 'gif', 'bmp']
for ext in exts:
#try with changed extension
thumb = filename[:-len(os.path.splitext(filename)[-1])] + "." + ext
if (os.path.isfile(thumb)):
return thumb
#also try with original extension
thumb = filename + "." + ext
if (os.path.isfile(thumb)):
return thumb
search
PHP Code:
def _import_roms(self, launcherName, addRoms = False):
...
romdata["name"] = romname
romdata["filename"] = fullname
romdata["thumb"] = ""
# add rom to the roms list (using name as index)
roms[romname] = romdata
...
change to
PHP Code:
def _import_roms(self, launcherName, addRoms = False):
...
romdata["name"] = romname
romdata["filename"] = fullname
#try the filename of the rom with different extension to get a valid thumbnail
thumb = self._get_local_thumb(fullname)
if thumb:
romdata["thumb"] = thumb
else:
romdata["thumb"] = ""
# add rom to the roms list (using name as index)
roms[romname] = romdata
...
and save the file
now delete "XBMC\plugins\Programs\Launcher\resources\lib\launcher_plugin.pyo".
Now try to import roms if the thumbs do not show up you probably need to remove the launcher first and add it again.
Tested with Launcher 1.04 and XBMC 9.11-a2 on WinXP64