|
Greetings, I've been trying to auto boot my XBMC's music playlist at startup but every Python Script I've tried ends in a syntax error. I've tried several this is my current one i found on a separate forum.
autoexec.py ------------------- import xbmc xbmc.executescript('q:\\scripts\\autoplay.py')
autoplay.py ---------------- import xbmc
pls = xbmc.playlist(0) * * * * * * * * * * * * * * * * * * * ##0 should be music playlist and 2 should be video playlist... not tested try: * *pls.load("f:\\Applications\\XBMC\\UserData\\playlists\\music\\x.m3u/") except: * *pls.load("q:\\UserData\\playlists\\music\\x.m3u") * ## always put twice \ for each dirs
pls.shuffle() * * * * * * * * * * * * * * * * * * * * * * * * * ## delete this line if you don't want random songs to be played from your given playlist xbmc.player().play(pls) * * * * * * * * * * * * * * * * * *## play the playlist
I've tried everything i could possibly think of, when i run the autoplay.py in XBMC it gives me a "ERROR Script Failed autoplay.py " i check the XBMC.log and it states that there's an invalid syntax.
ERROR: Error Contents: ('invalid syntax', ('Q:\\scripts\\autoplay.py', 3, 26, 'pls = xbmc.playlist(0) * * * * * * * * * * * * * * * * * * * ##0 should be music playlist and 2 should be video playlist... not tested\n')) 19:36:20 M: 40939520 ERROR: File "Q:\scripts\autoplay.py", line 3 pls = xbmc.playlist(0) * * * * * * * * * * * * * * * * * * * ##0 should be music playlist and 2 should be video playlist... not tested
I have the latest XBMC installed and I've tried over 3 separate codes and none of them work and ideas? Thanks
This post has been edited by Janglez334: Jul 30 2010, 01:10 AM
|