]> git.parisson.com Git - telemeta.git/commitdiff
Restore Jeroen Wijering's Flash MP3 Player
authoryomguy <>
Mon, 21 May 2007 20:52:51 +0000 (20:52 +0000)
committeryomguy <>
Mon, 21 May 2007 20:52:51 +0000 (20:52 +0000)
telemeta/export/flac.py
telemeta/templates/collection_detail.html

index 972938a3b2dfe8096405e8841ace1e64db6b2f93..43c3d6232850e9be748374cf4ae6273e913dbf68 100644 (file)
@@ -119,16 +119,52 @@ class FlacExporter(ExporterCore):
                                          self.ext,
                                          self.cache_dir,
                                          self.options)
+<<<<<<< .mine
+
+            # Initializing
+
+            command = 'sox "'+self.source+'" -q -w -r 44100 -t wav -c2 - '+
+                      '| flac '+args+' -c -'
+
+            chunk = 0
+            file_out = open(self.dest,'w')
+
+            # Processing
+                       proc = subprocess.Popen(command,
+                    shell=True,
+                    bufsize=self.buffer_size,
+                    stdin=subprocess.PIPE,
+                    stdout=subprocess.PIPE,
+                    close_fds=True)
+=======
         except:
             yield 'ExporterError [3]: pre_process'
+>>>>>>> .r109
+
+<<<<<<< .mine
+            chunk = proc.stdout.read(self.buffer_size)
+            yield chunk
+            file_out.write(chunk)
 
+            # Streaming
+            while chunk:
+                chunk = proc.stdout.read(self.buffer_size)
+=======
         # Processing (streaming + cache writing)
         try:
             stream = self.core_process(self.command,self.buffer_size,self.dest)
             for chunk in stream:
+>>>>>>> .r109
                 yield chunk
+<<<<<<< .mine
+                file_out.write(chunk)
+
+            #file_in.close()
+            file_out.close()
+=======
         except:
             yield 'ExporterError: core_process'
+>>>>>>> .r109
 
         # Post-proccessing
         try:
index 5e37e3a32908b838cab98fa38fe1ceaee1ad9de2..55361774b2a44d0dd16c87fe296fc539fb8f37df 100644 (file)
@@ -17,7 +17,7 @@
       <p><b>Listen to this collection</b>
       (<a href="{% url telemeta-collection-m3u object.id|urlencode %}">M3U</a>,
       <a href="{% url telemeta-collection-xspf object.id|urlencode %}">XSPF</a>)</p>
-      {% if 1 %} {# Use 1/0 for alternate player #}
+      {% if 0 %} {# Use 1/0 for alternate player #}
         <!-- This is the XSPF Web Music Player, under the BSD license, 
           from: http://musicplayer.sourceforge.net/-->
         <object type="application/x-shockwave-flash" width="300" height="200"