• 1
  • 21
  • 22
  • 23(current)
  • 24
  • 25
  • 453
[CLOSED] Advanced Launcher - Applications Launcher Addon for XBMC
Great work on this Angelscry. Very excited to get everything up and running with AL. Thanks!

While I've manually added a couple of games with no problem, I'm currently unable to run the "Scan and get info for new files" function to bring in all my roms. Getting the following error:

Code:
21:10:06 T:2872568688 M:1807814656  NOTICE: -->Python Interpreter Initialized<--
21:10:06 T:2872568688 M:1805783040  NOTICE: Mode AddOn ON
21:10:06 T:2872568688 M:1805783040  NOTICE: /home/medsrv/.xbmc/userdata/addon_data/plugin.program.advanced.launcher
21:10:06 T:2872568688 M:1805783040  NOTICE: -1
21:10:06 T:2872568688 M:1805783040  NOTICE: Launcher: found 1 launchers
21:10:06 T:2872568688 M:1805787136   ERROR: Error Type: exceptions.TypeError
21:10:06 T:2872568688 M:1805787136   ERROR: Error Contents: expected string or buffer
21:10:06 T:2872568688 M:1805787136   ERROR: Traceback (most recent call last):
                                              File "/home/medsrv/.xbmc/addons/plugin.program.advanced.launcher/addon.py", line 20, in ?
                                                plugin.Main()
                                              File "/home/medsrv/.xbmc/addons/plugin.program.advanced.launcher/resources/lib/launcher_plugin.py", line 168, in __init__
                                                self._import_roms(launcher)
                                              File "/home/medsrv/.xbmc/addons/plugin.program.advanced.launcher/resources/lib/launcher_plugin.py", line 921, in _import_roms
                                                romname = re.sub('\[.*?\]', '', romname)
                                              File "/usr/lib/xbmc/system/python/python24.zip/sre.py", line 142, in sub
                                                return _compile(pattern, 0).sub(repl, string, count)
                                            TypeError: expected string or buffer


My launchers.xml file:

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<launchers>
    <launcher>
        <name>SNES</name>
        <application>/usr/bin/zsnes</application>
        <args>-s</args>
        <rompath>/home/medsrv/emulators/snes/roms/</rompath>
        <thumbpath>/home/medsrv/emulators/snes/thumbnails/</thumbpath>
        <fanartpath>/home/medsrv/emulators/snes/fanart/</fanartpath>
        <romext>sfc</romext>
        <platform>Super Nintendo Entertainment System</platform>
        <thumb>/home/medsrv/emulators/snes/thumbnails/SNES-USA.jpg</thumb>
        <fanart></fanart>
        <genre>Console / 16-bit</genre>
        <release></release>
        <publisher>Nintendo</publisher>
        <launcherplot></launcherplot>
        <wait>true</wait>
        <roms>
            <rom>
                <name>Donkey Kong Country</name>
                <filename>/home/medsrv/emulators/snes/roms/Donkey Kong Country (U) (v1.2).sfc</filename>
                <platform>Super Nintendo Entertainment System</platform>
                <thumb>/home/medsrv/emulators/snes/thumbnails/Donkey Kong Country (U) (v1.2).jpg</thumb>
                <fanart>/home/medsrv/emulators/snes/fanart/Donkey Kong Country (U) (v1.2).jpg</fanart>
                <genre>Action</genre>
                <release>1994</release>
                <publisher>Rare</publisher>
                <gameplot>No rest for Donkey Kong, as his stash of bananas has been pilfered by the greedy Kremlins. Guide the mighty ape and his agile young companion Diddy Kong through varied levels of adventure in the quest to recover those missing bananas. Meet up with other members of the Kong family for entertaining conversation and useful information. Keep the enemies at bay with barrels and rolling attacks. Players can switch back and forth between Donkey Kong and Diddy Kong with the "Select" button and the unique abilities of each character are required to explore all the hidden areas and discover the many secrets of Donkey Kong Country.</gameplot>
            </rom>
        </roms>
    </launcher>
</launchers>

I'm running Ubuntu 10.04 with XBMC Dharma RC2 and AL 0.7.6.

Thanks
jpreville Wrote:@Angelscry

the external script works fine..

Now to figure out why its not working properly within XBMC?

does it work prorperly on your linux machine? In the Addon?

John

Ok, last try... Could you test this new _test_mame_name() function into the emulators.py fille :
Code:
def _test_mame_name( app, filename ):
    if ( app.lower().find('mame') > 0 ):
        try:
            page = subprocess.Popen(app+' -listfull '+filename, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
            output, errors = page.communicate()
        except :
            page = subprocess.Popen(app+' -listfull '+filename, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
            output = page.stdout.read()
        name = ''.join(re.findall('"(.*?)"', output.replace('\n', '')))
        romname = re.sub(' \(.*?\)', '', name).replace('/','-')
        return romname
    else:
        return filename
I'm using two differents method on my system :
  • First one, using page.communicate() works outside XBMC but not inside
  • Second one, page.stdout.read() works inside XBMC but not outside
Maybe it is the opposite on your system. If so, this script could use both methods. Thank you for your feedback.
i found few changes in lang files (may not only in polish) ALA 0.7.6

Code:
removed string 30511
30512 changed search all to search
30061 changed to string with %s
30065 as above
30071 as above

at line 86 added 3 strings

<string id="30076">No game data found</string>
<string id="30077">Select the game system</string>
<string id="30078">Select a game from %s</string>

changelog of langfile kind of this should help us to keep updates

updated polish lang

http://www.mediafire.com/?78c584577w055

there is something strange when im trying to add fanart or cover to standalone launcher
after selecting cover a ala asking me for launcher type and other things just like in create a new launcher.
its normally or there are bug with cover getting i.e. missing end of procedure command?

os: xp home
xbmc: dharma rc2
ala: 0.7.6
repo: 1.2.0
Robert de Clair Wrote:i found few changes in lang files (may not only in polish) ALA 0.7.6

Code:
removed string 30511
30512 changed search all to search
30061 changed to string with %s
30065 as above
30071 as above

at line 86 added 3 strings

<string id="30076">No game data found</string>
<string id="30077">Select the game system</string>
<string id="30078">Select a game from %s</string>

changelog of langfile kind of this should help us to keep updates

updated polish lang

http://www.mediafire.com/?78c584577w055

there is something strange when im trying to add fanart or cover to standalone launcher
after selecting cover a ala asking me for launcher type and other things just like in create a new launcher.
its normally or there are bug with cover getting i.e. missing end of procedure command?

os: xp home
xbmc: dharma rc2
ala: 0.7.6
repo: 1.2.0
Thank you for the translation. I will try to prevent you as much a possible when I will make some change into the strings.xml file that will need your help for the translation, and will refer your to the diff of strings.xml to ease you the translation.

Concerning your bug. As you have seen, I have added the fanart and thumbs scraper option for the stand-alone launcher (version 0.7.4). Before to scrap those images the ALA needs to know where to save the images. What's why now, during stand-alone launcher creation, I have added 2 new steps concerning the paths where the thumb and the fanart of the launcher will be saved (using <thumbpath> and <fanartpath> tags). So, if you have stand alone launchers that have been created before version.0.7.4 the <thumbpath> and <fanartpath> tags may be empty, ALA do not know where to save the files, and may generate errors. To solve this you can :
  • recreate the stand-alone launcher
  • or manually edit the luanchers.xml file and fill the <thumbpath> and <fanartpath> tags
http://www.mediafire.com/file/6la2zliffr...acking.zip

Blank installation of Dharma RC2
os: xp home
ala: 0.7.6
repo: 1.2.0

Error when i try scan for files a new created launcher.
Attached launchers.xml and xbmc.log file
Robert de Clair Wrote:http://www.mediafire.com/file/6la2zliffr...acking.zip

Blank installation of Dharma RC2
os: xp home
ala: 0.7.6
repo: 1.2.0

Error when i try scan for files a new created launcher.
Attached launchers.xml and xbmc.log file
Thank you for your feedback. It seems that it is the same error than rbrohman as reported. I'm actually on it... but not able to reproduce the error yet. I think there is some roms filename with strings that generate the error. Could you please give me the list of the roms files you want to scan? It will help me? Thank you.
I think a cause isnt romname, because i just change name to simplest as i can
Code:
Burgers.atr

http://www.mediafire.com/?zb8tn6q9vz5ji10

error log with this one as romname and with english language of xbmc

@rbrohman done Wink

errorlog
Code:
15:50:29 T:572 M:1355067392  NOTICE: -->Python Interpreter Initialized<--
15:50:29 T:572 M:1354055680  NOTICE: Mode AddOn ON
15:50:29 T:572 M:1354055680  NOTICE: D:\_Dokumenty\programy\XBMCD_RC2\portable_data\userdata\addon_data\plugin.program.advanced.launcher
15:50:29 T:572 M:1354055680  NOTICE: 0
15:50:29 T:572 M:1354022912  NOTICE: Launcher: found 1 launchers
15:50:33 T:808 M:1356144640  NOTICE: -->Python Interpreter Initialized<--
15:50:33 T:808 M:1355948032  NOTICE: Mode AddOn ON
15:50:33 T:808 M:1355948032  NOTICE: D:\_Dokumenty\programy\XBMCD_RC2\portable_data\userdata\addon_data\plugin.program.advanced.launcher
15:50:33 T:808 M:1355943936  NOTICE: -1
15:50:33 T:808 M:1355935744  NOTICE: Launcher: found 1 launchers
15:50:33 T:808 M:1354108928   ERROR: Error Type: exceptions.TypeError
15:50:33 T:808 M:1354739712   ERROR: Error Contents: expected string or buffer
15:50:33 T:808 M:1354878976   ERROR: Traceback (most recent call last):
                                              File "D:\_Dokumenty\programy\XBMCD_RC2\portable_data\addons\plugin.program.advanced.launcher\addon.py", line 20, in ?
                                                plugin.Main()
                                              File "D:\_Dokumenty\programy\XBMCD_RC2\portable_data\addons\plugin.program.advanced.launcher\resources\lib\launcher_plugin.py", line 168, in __init__
                                                self._import_roms(launcher)
                                              File "D:\_Dokumenty\programy\XBMCD_RC2\portable_data\addons\plugin.program.advanced.launcher\resources\lib\launcher_plugin.py", line 921, in _import_roms
                                                romname = re.sub('\[.*?\]', '', romname)
                                              File "special://xbmc/system/python/Lib\sre.py", line 142, in sub
                                                return _compile(pattern, 0).sub(repl, string, count)
                                            TypeError: expected string or buffer
15:51:04 T:3912 M:1359261696 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(addons) in addons://more/executable.tbn
15:52:49 T:2504 M:1348444160 WARNING: Previous line repeats 1 times.
15:52:49 T:2504 M:1348444160  NOTICE: -->Python Interpreter Initialized<--
15:52:49 T:2504 M:1347047424  NOTICE: Mode AddOn ON
15:52:49 T:2504 M:1347047424  NOTICE: D:\_Dokumenty\programy\XBMCD_RC2\portable_data\userdata\addon_data\plugin.program.advanced.launcher
15:52:49 T:2504 M:1347047424  NOTICE: 0
15:52:49 T:2504 M:1347018752  NOTICE: Launcher: found 1 launchers
15:52:52 T:2412 M:1349517312  NOTICE: -->Python Interpreter Initialized<--
15:52:52 T:2412 M:1349197824  NOTICE: Mode AddOn ON
15:52:52 T:2412 M:1349197824  NOTICE: D:\_Dokumenty\programy\XBMCD_RC2\portable_data\userdata\addon_data\plugin.program.advanced.launcher
15:52:52 T:2412 M:1349197824  NOTICE: -1
15:52:52 T:2412 M:1349189632  NOTICE: Launcher: found 1 launchers
15:52:53 T:2412 M:1347248128   ERROR: Error Type: exceptions.TypeError
15:52:53 T:2412 M:1347907584   ERROR: Error Contents: expected string or buffer
15:52:53 T:2412 M:1347706880   ERROR: Traceback (most recent call last):
                                              File "D:\_Dokumenty\programy\XBMCD_RC2\portable_data\addons\plugin.program.advanced.launcher\addon.py", line 20, in ?
                                                plugin.Main()
                                              File "D:\_Dokumenty\programy\XBMCD_RC2\portable_data\addons\plugin.program.advanced.launcher\resources\lib\launcher_plugin.py", line 168, in __init__
                                                self._import_roms(launcher)
                                              File "D:\_Dokumenty\programy\XBMCD_RC2\portable_data\addons\plugin.program.advanced.launcher\resources\lib\launcher_plugin.py", line 921, in _import_roms
                                                romname = re.sub('\[.*?\]', '', romname)
                                              File "special://xbmc/system/python/Lib\sre.py", line 142, in sub
                                                return _compile(pattern, 0).sub(repl, string, count)
                                            TypeError: expected string or buffer
15:52:54 T:660 M:1349361664  NOTICE: Storing total System Uptime
15:52:54 T:660 M:1349427200  NOTICE: Saving settings
15:52:54 T:660 M:1349476352  NOTICE: stop all
15:52:54 T:660 M:1349476352  NOTICE: ES: Stopping event server
15:52:55 T:1376 M:1349509120  NOTICE: ES: UDP Event server stopped
15:52:55 T:660 M:1349533696  NOTICE: stop sap announcement listener
15:52:55 T:660 M:1349533696  NOTICE: clean cached files!
15:52:55 T:660 M:1349525504  NOTICE: unload skin
15:52:55 T:660 M:1349529600  NOTICE: stop python

launchers.xml
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<launchers>
    <launcher>
        <name>Atari 8Bit</name>
        <application>D:\Emulatory\Atari XL\Atari800Win.exe</application>
        <args></args>
        <rompath>D:\Emulatory\Atari XL\Gry\</rompath>
        <thumbpath>D:\Emulatory\Atari XL\_Thumbnails\</thumbpath>
        <fanartpath>D:\Emulatory\Atari XL\_Fanarts\</fanartpath>
        <romext>atr</romext>
        <platform>Atari 400/800/XL/XE</platform>
        <thumb></thumb>
        <fanart></fanart>
        <genre></genre>
        <release></release>
        <publisher></publisher>
        <launcherplot></launcherplot>
        <wait>true</wait>
        <roms>
        </roms>
    </launcher>
</launchers>
Angelscry,

I've posted my rom list http://pastebin.com/kYXjga6J

It's a GoodMerge set for all US released SNES games.

Robert,

I think it's easier to post contents of text files on pastebin.com. It's easier to copy and paste than to upload, plus nobody has to download or unzip. Just a suggestion!
rbrohman Wrote:Angelscry,
I've posted my rom list http://pastebin.com/kYXjga6J
It's a GoodMerge set for all US released SNES games.
Robert,
I think it's easier to post contents of text files on pastebin.com. It's easier to copy and paste than to upload, plus nobody has to download or unzip. Just a suggestion!

Robert de Clair Wrote:I think a cause isnt romname, because i just change name to simplest as i can
Code:
Burgers.atr
http://www.mediafire.com/?zb8tn6q9vz5ji10
error log with this one as romname and with english language of xbmc
I have found the problem.
Code:
romname = self._test_mame_name(selectedLauncher["application"],f[:-len(ext)-1])
romname = re.sub('\[.*?\]', '', romname)
Ok... it is clealry not the romname. I think that my _test_mame_name function is not returning the romname into the right format and generate an error. I will try to fix it this evening or tomorrow. Thank you very much for your help.

I you do not want to wait the update and do not care about MAME games just replace the previous 2 line code by this one into the launcher_plugin.py file :
Code:
romname = re.sub('\[.*?\]', '', f[:-len(ext)-1])
hi guys im having alot of problems. i cant import my artwork, it does not get the thumb and fanart which i placed in the rom directory but its still importing images that i already deleted from a previous test import, also when im trying to add new launcher and set up directories it changes back to c:emulators and does not go further down. my emulators are plced c:program files\emulatoren\ and each emu in its own folder. ive tried deleting launcher from addons and reinstalling and deleting it from userdata but no go!!! ive named my files sf2_thumb.png and sf2_fanart.png.

please any help would be much appreciated.


xbmc log
http://pastebin.com/AT12ZQUM

launchxml

http://pastebin.com/aqfbUTUR
ali2k1 Wrote:hi guys im having alot of problems. i cant import my artwork, it does not get the thumb and fanart which i placed in the rom directory but its still importing images that i already deleted from a previous test import, also when im trying to add new launcher and set up directories it changes back to c:emulators and does not go further down. my emulators are plced c:program files\emulatoren\ and each emu in its own folder. ive tried deleting launcher from addons and reinstalling and deleting it from userdata but no go!!! ive named my files sf2_thumb.png and sf2_fanart.png.

please any help would be much appreciated.


xbmc log
http://pastebin.com/AT12ZQUM

launchxml

http://pastebin.com/aqfbUTUR

You have a mistake into your launchers.xml file :
Code:
<rompath>C:\Program Files\Emulatoren\capcom classics\roms\</rompath>
<thumbpath>C:\Program Files\Emulatoren\capcom classics\roms\</thumbpath>
<fanartpath>C:\Program Files\Emulatoren\capcom classics\</fanartpath>
If your thumbs and fanarts images are into your roms directory your launchers.xml file musr be:
Code:
<rompath>C:\Program Files\Emulatoren\capcom classics\roms\</rompath>
<thumbpath>C:\Program Files\Emulatoren\capcom classics\roms\</thumbpath>
<fanartpath>C:\Program Files\Emulatoren\capcom classics\roms\</fanartpath>
If <thumbpath> and <fanartpath> are differents ALA will automatically load and save your images with under the name romname.jpg. If <thumbpath> and <fanartpath> indicate the same directory ALA will automatically load and save your images under different names romname_thumb.jpg and romname_fanart.jpg. Supported images files extension are .gif, .jpeg, .jpg, .png, etc...
tahnk you for you response. thats the problem, when i choose directories its all ok it shows the path i chose on the top right corner but when i press ok it goes back to c:program files\emulators. il try again and see what happens its been happening since last night and i tried countless times resulting with the same error.thank you.
Angelscry Wrote:I have found the problem.
Code:
romname = self._test_mame_name(selectedLauncher["application"],f[:-len(ext)-1])
romname = re.sub('\[.*?\]', '', romname)
Ok... it is clealry not the romname. I think that my _test_mame_name function is not returning the romname into the right format and generate an error. I will try to fix it this evening or tomorrow. Thank you very much for your help.

I you do not want to wait the update and do not care about MAME games just replace the previous 2 line code by this one into the launcher_plugin.py file :
Code:
romname = re.sub('\[.*?\]', '', f[:-len(ext)-1])
That solved the problem for me. My roms are now being scanned in. Thanks!


Unrelated: do you add the info to <launcherplot> </launcherplot> manually, or is there an ability to automatically pull the system info as well?
rbrohman Wrote:Unrelated: do you add the info to <launcherplot> </launcherplot> manually, or is there an ability to automatically pull the system info as well?
No, actually the only way is to edit the launchers.xml file manually. I have try to add an edit option into XBMC but I was not able to found a way to edit multi-lines text into XBMC. I have also think about create a kind of system scraper but I have not found yet a website source giving a good description for all the game system.
@Angelscry

The Mod you had me apply to the Launcher seems to be working.. So far!!!!

I'm running it on my laptop at work which has all the mame roms. So Far So Good.
But its has 8000+ to go through. But i'll also test it on my Main XBMC machine when i get home tonight..


And give you a update..

John

Update:

Almost .. Think the pid or something needs to be closed after each scan . possibly?

Quote:3:12:46 T:140412337514256 M:479277056 ERROR: Traceback (most recent call last):
File "/home/john/.xbmc/addons/plugin.program.advanced.launcher/addon.py", line 20, in ?
plugin.Main()
File "/home/john/.xbmc/addons/plugin.program.advanced.launcher/resources/lib/launcher_plugin.py", line 168, in __init__
self._import_roms(launcher)
File "/home/john/.xbmc/addons/plugin.program.advanced.launcher/resources/lib/launcher_plugin.py", line 920, in _import_roms
romname = self._test_mame_name(selectedLauncher["application"],f[:-len(ext)-1])
File "/home/john/.xbmc/addons/plugin.program.advanced.launcher/resources/lib/emulators.py", line 39, in _test_mame_name
page = subprocess.Popen(app+' -listfull '+filename, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/xbmc/system/python/python24.zip/subprocess.py", line 534, in __init__
(p2cread, p2cwrite,
File "/usr/lib/xbmc/system/python/python24.zip/subprocess.py", line 835, in _get_handles
c2pread, c2pwrite = os.pipe()
OSError: (24, 'Too many open files')

looks like xbmc is opening to many pipes...
and causes the above error. there' got be someway of possibly closing each process. or possibly opening only up one cmd/bash process. then throwing the command needed to mame. then close that cmd/bash.. i'll play around.

lsof|grep xbmc.bin will show number of files open.
  • 1
  • 21
  • 22
  • 23(current)
  • 24
  • 25
  • 453

Logout Mark Read Team Forum Stats Members Help
[CLOSED] Advanced Launcher - Applications Launcher Addon for XBMC24