# HG changeset patch # User Josef "Jeff" Sipek # Date 1162809154 18000 # Node ID 3eee483b5c4e8b6cd477f3512e9452a926835d6f # Parent 1ae315a490091447869230d8ea742e21a2a079de start with random song if we're supposed to randomize diff -r 1ae315a49009 -r 3eee483b5c4e vixm/main.py --- a/vixm/main.py Mon Nov 06 05:25:05 2006 -0500 +++ b/vixm/main.py Mon Nov 06 05:32:34 2006 -0500 @@ -24,6 +24,8 @@ lists[playlist.LIST_DEFAULT].enqueue(s) idx += 1 + + lists[playlist.LIST_DEFAULT].first_song() print "Instanciating player thread..." play = player.playerThread() diff -r 1ae315a49009 -r 3eee483b5c4e vixm/playlist.py --- a/vixm/playlist.py Mon Nov 06 05:25:05 2006 -0500 +++ b/vixm/playlist.py Mon Nov 06 05:32:34 2006 -0500 @@ -15,8 +15,11 @@ def __init__(self, allowrandom=False): self.__list = [] self.__allowrand = allowrandom # allow randomization of this list - self.__cursor = 0 + self.__cursor = -1 + def first_song(self): + self.__cursor = self.__allowrand and self.__rnd() or 0 + def enqueue(self, song): """ Append a song to the list """ self.__list.append(song)