From: Guillaume Pellerin Date: Wed, 1 Dec 2010 10:18:54 +0000 (+0100) Subject: fix audio path X-Git-Tag: 1.1~486^2~8 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=5aa5286ce1fb06e7ab201eeb8964c2e872887247;p=telemeta.git fix audio path --- diff --git a/telemeta/web/base.py b/telemeta/web/base.py index 8201a393..2f1a62c5 100644 --- a/telemeta/web/base.py +++ b/telemeta/web/base.py @@ -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