]> git.parisson.com Git - deefuzzer.git/commitdiff
Get multi stations !
authorGuillaume Pellerin <yomguy@parisson.com>
Sun, 16 Sep 2007 01:50:59 +0000 (01:50 +0000)
committerGuillaume Pellerin <yomguy@parisson.com>
Sun, 16 Sep 2007 01:50:59 +0000 (01:50 +0000)
d-fuzz.py
example/myfuzz.xml

index 2a57e98b2e454688f9e8f4c83670ae63f73a3084..5191f00927d4138e843b4bda8e3c47341a924aa1 100755 (executable)
--- a/d-fuzz.py
+++ b/d-fuzz.py
@@ -69,12 +69,12 @@ class DFuzz(Thread):
         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()
@@ -85,7 +85,6 @@ class Station(DFuzz):
     def __init__ (self, station):
         Thread.__init__(self)
         self.station = station
-        print self.station
         self.channels = int(self.station['infos']['channels'])
         
     def run(self):
@@ -118,7 +117,7 @@ class Channel(Thread):
         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'])
 
index 332d98f5e9a42e94b07a83a6d8fd6fe981dffb7c..7fd51b02bedf3213653f8e309b446f7c3a2205a1 100644 (file)
@@ -1,29 +1,55 @@
 <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>