print "D-fuzz v"+self.version
self.conf = self.get_conf_dict()
print self.conf
- nb_stations = len(self.conf['d-fuzz'])
+ nb_stations = len(self.conf['d-fuzz']['station'])
print str(nb_stations)
for i in range(0,nb_stations):
- print str(i)
- station = self.conf['d-fuzz']['station']
+ #print str(i)
+ station = self.conf['d-fuzz']['station'][i]
print station
station_thread = Station(station)
station_thread.start()
def __init__ (self, station):
Thread.__init__(self)
self.station = station
- print self.station
self.channels = int(self.station['infos']['channels'])
def run(self):
self.channel.user = 'source'
self.channel.password = station['server']['sourcepassword']
self.channel.mount = '/' + station['infos']['short_name'] + '_' + \
- str(self.id) + '.' + self.channel.format
+ str(self.channel_id) + '.' + self.channel.format
print self.channel.mount
self.channel.public = int(station['server']['public'])
<d-fuzz>
-<station>
- <infos>
- <short_name>Cellar_Playlist</short_name>
- <name>Cellar @ D-Fuzz, Paris (100% Mix Techno, House and Groove !)</name>
- <description>The Best Techno, House and Groove Stuff from Paris - 100% Mix !</description>
- <url>http://cellar.parisson.com</url>
- <genre>Techno/House</genre>
- <channels>1</channels>
- </infos>
- <server>
- <host>localhost</host>
- <port>8000</port>
- <mountpoint>/d-fuzz_1.mp3</mountpoint>
- <sourcepassword>source2parisson</sourcepassword>
- <public>1</public>
- </server>
- <media>
- <dir>/home/pub/samples/samples2/groovemasters/Groovemasters Drums/mp3</dir>
- <format>mp3</format>
- <bitrate>192</bitrate>
- <ogg_quality>7</ogg_quality>
- <samplerate>44100</samplerate>
- <voices>2</voices>
- <shuffle>1</shuffle>
- </media>
-</station>
+ <station>
+ <infos>
+ <short_name>Cellar_Playlist</short_name>
+ <name>Cellar @ D-Fuzz, Paris (100% Mix Techno, House and Groove !)</name>
+ <description>The Best Techno, House and Groove Stuff from Paris - 100% Mix !</description>
+ <url>http://cellar.parisson.com</url>
+ <genre>Techno/House</genre>
+ <channels>1</channels>
+ </infos>
+ <server>
+ <host>localhost</host>
+ <port>8000</port>
+ <mountpoint>/d-fuzz_1.mp3</mountpoint>
+ <sourcepassword>source2parisson</sourcepassword>
+ <public>1</public>
+ </server>
+ <media>
+ <dir>/home/pub/samples/samples2/groovemasters/Groovemasters Drums/mp3</dir>
+ <format>mp3</format>
+ <bitrate>192</bitrate>
+ <ogg_quality>7</ogg_quality>
+ <samplerate>44100</samplerate>
+ <voices>2</voices>
+ <shuffle>1</shuffle>
+ </media>
+ </station>
+ <station>
+ <infos>
+ <short_name>Cellar_Playlist_2</short_name>
+ <name>Cellar @ D-Fuzz, Paris (100% Mix Techno, House and Groove !)</name>
+ <description>The Best Techno, House and Groove Stuff from Paris - 100% Mix !</description>
+ <url>http://cellar.parisson.com</url>
+ <genre>Techno/House</genre>
+ <channels>1</channels>
+ </infos>
+ <server>
+ <host>localhost</host>
+ <port>8000</port>
+ <mountpoint>/d-fuzz_2.mp3</mountpoint>
+ <sourcepassword>source2parisson</sourcepassword>
+ <public>1</public>
+ </server>
+ <media>
+ <dir>/home/pub/samples/samples2/groovemasters/Groovemasters Drums/mp3</dir>
+ <format>mp3</format>
+ <bitrate>192</bitrate>
+ <ogg_quality>7</ogg_quality>
+ <samplerate>44100</samplerate>
+ <voices>2</voices>
+ <shuffle>1</shuffle>
+ </media>
+ </station>
</d-fuzz>