Can't get music script to play my music on startup
#1
Wink 
i have the 5.15.05 cvs build. i can not get my music collection to automatically play ramdomly on startup. only one startup.mp3 plays on start-up plays but that was by the default on new cvs build.
heres what i did before to make it work on the project mayhem ii cvs 1-10-05 build
i used:

------------------------------------------------------------------------------------------
-------
#script by c. newman
#the scripts selects for a given directory with playlists one playlist and plays it immediatly

import nt, xbmc, xbmcgui
from random import random
from time import *

def getrandomplaylist(path):
seed = time()/1000
g = random(seed)
list = nt.listdir(path)
intcount = len(list)
number = g.random()*intcount
intnumber = int(number)
return list[intnumber]


dialog = xbmcgui.dialogprogress()

#define playlist directory here
path = 'f:\\music\\ryan's music\\'

#select playlist
playlist = getrandomplaylist(path)
dialog.create("randomly select a playlist", playlist)

xbmc.playlist(0).load(path+playlist)
xbmc.playlist(0).shuffle()
xbmc.player().play()

dialog.close()
------------------------------------------------------------------------------------------
-------
and i used
------------------------------------------------------------------------------------------
-------
# auto execute scripts when xbmc starts, place this file in xbmchome\scripts\
#
# note: - do not execute more than one script at a time which asks for user input!

import xbmc

xbmc.executescript('q:\\scripts\\randomplay2.py')
------------------------------------------------------------------------------------------
-------
so basically i'm stuck cause thats what worked for me before in the last build but can't get it to work on the new build.

also i've tried putting it in different folders or deleting delete the e:\tdata\0face008 folder

i've also tried using:
mp3shuffler.py,
randomplay by ce code est les propriété de [email="[email protected]"][email protected][/email] # version 0.1, and mp3.py

my understading is that if i could make a playlist it would be easier for it to select or i could be wrong cause a path could define my music folder as a playlist. anyway the mediacenter can play playlists but cannot create one is my understanding.
i appreciate any support or any correction of where i'm going wrong.
-
Reply

Logout Mark Read Team Forum Stats Members Help
Can't get music script to play my music on startup0