I did something like this.
Note: I'm a noob at Coding Python, so.. there is probably an easier way of doing something like this.
the autoexec.py file
CODE
import xbmc
xbmc.executescript('q:\\scripts\\start_music.py')
the start_music.py file
CODE
import xbmc, os, string, random, time
random.seed = time.time()
directory = 'q:\\scripts\\mp3\\'
MusicList = []
i = 0
filenames = os.listdir(directory)
for filename in filenames:
MusicList.append(directory+filename)
i = i + 1
i = random.randrange(0, i)
filetoplay = MusicList
xbmc.Player().play(filetoplay)
This post has been edited by kerv: Dec 23 2004, 10:40 PM
hi frnd
does this really work
have u tried.
sorry I have no python lib installed yet on xbmc to test this.
regards
julie