]> git.parisson.com Git - telemeta.git/commitdiff
fix audio path
authorGuillaume Pellerin <yomguy@parisson.com>
Wed, 1 Dec 2010 10:18:54 +0000 (11:18 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Wed, 1 Dec 2010 10:18:54 +0000 (11:18 +0100)
telemeta/web/base.py

index 8201a3939361919c6664a21e386c8014f2ca3dce..2f1a62c51fb3341d8b3b1f5195671bc3b1498986 100644 (file)
@@ -217,12 +217,13 @@ class WebView:
         file = public_id + '.' + encoder.file_extension()
         
         item = MediaItem.objects.get(public_id=public_id)
-        decoder = timeside.decoder.FileDecoder(item.file.path)
+        audio = os.path.join(os.path.dirname(__file__), item.file.path)
+        decoder = timeside.decoder.FileDecoder(audio)
 
         if decoder.format() == mime_type:
             # source > stream
             #print item.file.path
-            response = HttpResponse(stream_from_file(item.file.path), mimetype = mime_type)
+            response = HttpResponse(stream_from_file(audio), mimetype = mime_type)
         else:        
             if not self.cache_export.exists(file):
                 # source > encoder > stream