Help - Search - Members - Calendar
Full Version: Autoboot Xbmc Music Playlist At Startup (syntax Error)
Scenyx Entertainment Community > Xbox1 Forums > Software Forums > XBMC for Xbox Forums > XBMC Python Scripting Forum
Janglez334
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
cozmo72
hey buddy, you dont need to install a plugin, just go into skin settings/general, scroll down to play playlist at start up and your sorted. which skin are you using? i use transparency! v2.11 and the music starts up everytime without fail. let me know how you get on
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.