]> git.parisson.com Git - deefuzzer.git/commitdiff
verbose clean up, add new mp3 template
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 10 Mar 2009 16:41:08 +0000 (16:41 +0000)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 10 Mar 2009 16:41:08 +0000 (16:41 +0000)
defuzz.py
example/test_mp3.xml [new file with mode: 0644]

index 226d14fee7c7dfc8d607b18b7d30835515d840a2..6b8173b64d8d9c8b7bae95df25aaeb4064384f58 100755 (executable)
--- a/defuzz.py
+++ b/defuzz.py
@@ -234,15 +234,13 @@ class Station(Thread):
         print "Using libshout version %s" % shout.version()
         q = self.q
         __chunk = 0
-        self.channel.open()
-        print 'Opening ' + self.short_name + ' - ' + self.channel.name + '...'
-        time.sleep(0.1)
-
-        # Playlist
         playlist = self.get_playlist()
         lp = len(playlist)
-        #print playlist
         self.rand_list = range(0,lp-1)
+        self.channel.open()
+        print 'Opening ' + self.short_name + ' - ' + self.channel.name + \
+                ' (' + str(lp) + ' tracks)...'
+        time.sleep(0.1)
 
         while True:
             if lp == 0:
diff --git a/example/test_mp3.xml b/example/test_mp3.xml
new file mode 100644 (file)
index 0000000..61f7c2d
--- /dev/null
@@ -0,0 +1,195 @@
+<defuzz>
+    <station>
+        <infos>
+            <short_name>My_Station_1</short_name>
+            <name>My best funky station</name>
+            <description>My personal best funky playlist ever !</description>
+            <url>http://mydomain.com</url>
+            <genre>Other</genre>
+        </infos>
+        <server>
+            <host>localhost</host>
+            <port>8000</port>
+            <sourcepassword>source2parisson</sourcepassword>
+            <public>1</public>
+        </server>
+        <media>
+            <dir>/home/momo/music/mp3/groovemaster_drums/</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>My_Station_2</short_name>
+            <name>My best funky station</name>
+            <description>My personal best funky playlist ever !</description>
+            <url>http://mydomain.com</url>
+            <genre>Other</genre>
+        </infos>
+        <server>
+            <host>localhost</host>
+            <port>8000</port>
+            <sourcepassword>source2parisson</sourcepassword>
+            <public>1</public>
+        </server>
+        <media>
+            <dir>/home/momo/music/mp3/groovemaster_drums/</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>My_Station_3</short_name>
+            <name>My best funky station</name>
+            <description>My personal best funky playlist ever !</description>
+            <url>http://mydomain.com</url>
+            <genre>Other</genre>
+        </infos>
+        <server>
+            <host>localhost</host>
+            <port>8000</port>
+            <sourcepassword>source2parisson</sourcepassword>
+            <public>1</public>
+        </server>
+        <media>
+            <dir>/home/momo/music/mp3/groovemaster_drums/</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>My_Station_4</short_name>
+            <name>My best funky station</name>
+            <description>My personal best funky playlist ever !</description>
+            <url>http://mydomain.com</url>
+            <genre>Other</genre>
+        </infos>
+        <server>
+            <host>localhost</host>
+            <port>8000</port>
+            <sourcepassword>source2parisson</sourcepassword>
+            <public>1</public>
+        </server>
+        <media>
+            <dir>/home/momo/music/mp3/groovemaster_drums/</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>My_Station_5</short_name>
+            <name>My best funky station</name>
+            <description>My personal best funky playlist ever !</description>
+            <url>http://mydomain.com</url>
+            <genre>Other</genre>
+        </infos>
+        <server>
+            <host>localhost</host>
+            <port>8000</port>
+            <sourcepassword>source2parisson</sourcepassword>
+            <public>1</public>
+        </server>
+        <media>
+            <dir>/home/momo/music/mp3/groovemaster_drums/</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>My_Station_6</short_name>
+            <name>My best funky station</name>
+            <description>My personal best funky playlist ever !</description>
+            <url>http://mydomain.com</url>
+            <genre>Other</genre>
+        </infos>
+        <server>
+            <host>localhost</host>
+            <port>8000</port>
+            <sourcepassword>source2parisson</sourcepassword>
+            <public>1</public>
+        </server>
+        <media>
+            <dir>/home/momo/music/mp3/groovemaster_drums/</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>My_Station_7</short_name>
+            <name>My best funky station</name>
+            <description>My personal best funky playlist ever !</description>
+            <url>http://mydomain.com</url>
+            <genre>Other</genre>
+        </infos>
+        <server>
+            <host>localhost</host>
+            <port>8000</port>
+            <sourcepassword>source2parisson</sourcepassword>
+            <public>1</public>
+        </server>
+        <media>
+            <dir>/home/momo/music/mp3/groovemaster_drums/</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>My_Station_8</short_name>
+            <name>My best funky station</name>
+            <description>My personal best funky playlist ever !</description>
+            <url>http://mydomain.com</url>
+            <genre>Other</genre>
+        </infos>
+        <server>
+            <host>localhost</host>
+            <port>8000</port>
+            <sourcepassword>source2parisson</sourcepassword>
+            <public>1</public>
+        </server>
+        <media>
+            <dir>/home/momo/music/mp3/groovemaster_drums/</dir>
+            <format>mp3</format>
+            <bitrate>192</bitrate>
+            <ogg_quality>7</ogg_quality>
+            <samplerate>44100</samplerate>
+            <voices>2</voices>
+            <shuffle>1</shuffle>
+        </media>
+    </station>
+</defuzz>
+