Loving this plugin, but one thing bothers me: launchers.xml isn't sorted after scanning a folder. Possible to fix?
I also noticed that if you edit the file manually, and then add a game through the interface it borks up the file, leaving you with this:
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<launchers>
<launcher>
<name>Super Nintendo</name>
<application>/usr/bin/snes9x-gtk</application>
<args></args>
<rompath>/storage/roms/Super Nintendo/</rompath>
<romext>smc</romext>
<thumb></thumb>
<fanart></fanart>
<genre></genre>
<release></release>
<publisher></publisher>
<launcherplot></launcherplot>
<wait>true</wait>
<roms>
<rom>
<name>Legend of zelda - a link to the past</name>
<filename>/storage/roms/Super Nintendo/Legend of Zelda - A link to the past.smc</filename>
<thumb>/storage/roms/Super Nintendo/covers/Zelda Link to the past.jpg</thumb>
<fanart>/storage/roms/Super Nintendo/fanart/Zelda Link to the past.jpg</fanart>
<genre></genre>
<release></release>
<publisher></publisher>
<gameplot></gameplot>
</rom>
<rom>
<name>Asterix & obelix</name>
<filename>/storage/roms/Super Nintendo/Asterix & Obelix.smc</filename>
<thumb>/storage/roms/Super Nintendo/covers/Asterix and Obelix.jpg</thumb>
<fanart></fanart>
<genre></genre>
<release></release>
<publisher></publisher>
<gameplot></gameplot>
</rom>
<rom>
<name>Tetris 2 added manually</name>
<filename>/storage/roms/Super Nintendo/Tetris 2.smc</filename>
<thumb></thumb>
Stops after <thumb></thumb> that is. XBMC says the script failed, and the log says this:
http://pastebin.com/NfAnyZYh
I think this is the important part:
Code:
15:07:35 T:140336875837504 M:1329094656 DEBUG: ------ Window Deinit (DialogKeyboard.xml) ------
15:07:35 T:140336397915920 M:1329094656 INFO: -->Python script returned the following error<--
15:07:35 T:140336397915920 M:1329094656 ERROR: Error Type: exceptions.KeyError
15:07:35 T:140336397915920 M:1329094656 ERROR: Error Contents: fanart
15:07:35 T:140336875837504 M:1329094656 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
15:07:35 T:140336875837504 M:1329094656 DEBUG: Alloc resources: 0.00ms (0.00 ms skin load)
15:07:35 T:140336397915920 M:1329094656 ERROR: Traceback (most recent call last):
File "/home/htpc/.xbmc/addons/plugin.program.launcher/default.py", line 20, in ?
plugin.Main()
File "/home/htpc/.xbmc/addons/plugin.program.launcher/resources/lib/launcher_plugin.py", line 150, in __init__
self._add_new_rom(launcher)
File "/home/htpc/.xbmc/addons/plugin.program.launcher/resources/lib/launcher_plugin.py", line 759, in _add_new_rom
self._save_launchers()
File "/home/htpc/.xbmc/addons/plugin.program.launcher/resources/lib/launcher_plugin.py", line 343, in _save_launchers
usock.write("\t\t\t\t<fanart>"+romdata["fanart"]+"</fanart>\n")
KeyError: fanart
15:07:35 T:140336397915920 M:1329094656 INFO: -->End of Python script error report<--
Which would make sense seeing as it stops after <thumb></thumb>.
This is probably (well, it is) because I'm using Angelscry's edited version, to add fanart/thumb support. I suppose this is going to be added to the official version at some point, so this could be good to be aware of (although you probably know there's no fanart key.
).
Easy fix though: add games manually via launchers.xml
Oh yeah, one more thing: is is possible to add a check to see if XBMC is windowed/full screened? If it is FS and you launch a game, XBMC is windowed and the game is played FS, upon exit XBMC is FS again. However, if XBMC is already windowed, it is fullscreened and the game is windowed (sometimes it works though), and then XBMC is windowed again upon exit. No need to do the "hit backslash key"-action if already windowed.