xboxscene.org forums

Author Topic: Autorun Playlist On Startup  (Read 80 times)

Zeosstud

  • Archived User
  • Newbie
  • *
  • Posts: 42
Autorun Playlist On Startup
« on: January 25, 2005, 01:07:00 AM »

I DID NOT WRITE THIS CODE
I DID NOT WRITE THIS CODE

I did however spend an entire evening finding something that worked for me so I thought I would share, hoping it saves some other poor sole some time.  

Create a playlist, call it whatever you want, for my example we will call it playlist.m3u

When you do that it will be saved into your XBMC directory under Albums\Playlists

create a autoexec.py that looks like this

import xbmc
xbmc.executescript('q:\\scripts\\autoplay.py')

place it in your XBMC directory under Scripts

create a autoplay.py that looks like this

file = 'q:\\albums\\playlists\\playlist.m3u'
pls = xbmc.PlayList(0)
pls.load(file)
pls.shuffle()
xbmc.Player().play(pls)

place it in your XBMC directory under Scripts

Thats it, I am using the 1-15-05 CVS of XBMC and this is working for me.  
I have seen all kinds of things tonight, randomplay.py in french (didnt work for me) a few other startup type scripts, one would play, 1 song, then everything else acted all goofed up.  This just worked.  Now I can put the damn xbox back in the car and maybe, just maybe the wife will use it alittle more often.

I DID NOT WRITE THIS CODE
I DID NOT WRITE THIS CODE
 <
Logged

tplbi

  • Archived User
  • Newbie
  • *
  • Posts: 4
Autorun Playlist On Startup
« Reply #1 on: February 01, 2005, 11:07:00 PM »

exactly what i was looking for. Easier than I thought it would be. They should build those  .py files into xbmc then if you chose to, just create the playlist.m3u and its done. Now I'm gonna go set XBMC as my default dash so all i have to do is power it on and my music will start. sweet <
Logged

incognegro

  • Archived User
  • Hero Member
  • *
  • Posts: 1764
Autorun Playlist On Startup
« Reply #2 on: February 02, 2005, 09:40:00 AM »

how do you do that?.......i mean edit the pythom scripts? im kinda new to xbmc <
Logged

Zeosstud

  • Archived User
  • Newbie
  • *
  • Posts: 42
Autorun Playlist On Startup
« Reply #3 on: February 02, 2005, 03:16:00 PM »

A python script is simply a text file.  Use Notepad to mess with mine.  I am NOT a programmer.  That script was one I found that worked so I thought I would share it with anyone who might get alittle use out of it.

Zeosstud <
Logged