]> git.parisson.com Git - deefuzzer.git/commitdiff
Clean up
authorGuillaume Pellerin <yomguy@parisson.com>
Sun, 9 Sep 2007 08:58:25 +0000 (08:58 +0000)
committerGuillaume Pellerin <yomguy@parisson.com>
Sun, 9 Sep 2007 08:58:25 +0000 (08:58 +0000)
d-fuzz.py
myfuzz.xml

index 37530c9ee45de60bded32bfcaaeff597450f76e6..2a981e31a4d3edb2d694582d12c5204381647273 100755 (executable)
--- a/d-fuzz.py
+++ b/d-fuzz.py
@@ -77,10 +77,6 @@ class DFuzz:
     def get_station_names(self):
         return self.conf['station']['name']
         
-    def check_work_dir(self):
-        if not os.isdir.exists(self.work_dir):
-            os.mkdir(self.work_dir)
-        
     def get_playlist(self):
         file_list = []
         for root, dirs, files in os.walk(self.media_dir):
@@ -175,16 +171,13 @@ class DFuzz:
         #  (keys are shout.SHOUT_AI_BITRATE, shout.SHOUT_AI_SAMPLERATE,
         #   shout.SHOUT_AI_CHANNELS, shout.SHOUT_AI_QUALITY)
         
-        s.open()
-
-        #total = 0
-        #st = time.time()
         command = 'cat '
         playlist = self.get_playlist()
         lp = len(playlist)
         print 'Playlist :'
         print playlist
                     
+        s.open()
         while True:
             if lp == 0:
                 break 
@@ -195,18 +188,11 @@ class DFuzz:
             s.set_metadata({'song': file_name})
             command = 'cat "%s"' % media
             stream = self.core_process(command, self.buffer_size)
-       
             for chunk in stream:
-                #total = total + len(self.buffer_size)
                 s.send(chunk)
                 s.sync()
-                        
-            #et = time.time()
-            #br = total*0.008/(et-st)
-            #print "Sent %d bytes in %d seconds (%f kbps)" % (total, et-st, br)
+        s.close()
 
-        print s.close()
-        
 
 def main():    
     station = DFuzz()
index 9aeddd879e426baea25c6682bd3012a4ec8b8583..7d95c3e2ea05be7d31b7081f19a73c867bed58e7 100644 (file)
@@ -15,7 +15,7 @@
         <public>1</public>
     </server>
     <media>
-        <dir>/home/momo/music/mp3/</dir>
+        <dir>/home/momo/music/music3/mp3/Roger Troutman</dir>
         <format>mp3</format>
         <bitrate>192</bitrate>
         <ogg_quality>7</ogg_quality>