summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-08-14 21:59:35 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-08-14 21:59:35 +0200
commit74ad26edc2cf0d8aa8d5d485d708de1a34aa75c0 (patch)
tree9b3311046562d1e1267487568cbe5f425011c719 /app.py
parent78c0eae9a300b18060cc9f5b4114d843e87a2025 (diff)
Some recoding work, added ogg encoder.
Diffstat (limited to 'app.py')
-rwxr-xr-xapp.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app.py b/app.py
index e70283c..c2ef0a3 100755
--- a/app.py
+++ b/app.py
@@ -65,7 +65,8 @@ class Application(object):
f = File(path)
# see json_play()
if not os.path.splitext(path)[1] in ('.mp3', '.ogg'):
- decoder, encoder = ('ffmpeg',)*2
+ decoder = 'ffmpeg'
+ encoder = config.get('encoder')
f.start_recode(decoder, encoder)
start_response('200 OK', [('Content-Type', 'text/plain')])
@@ -80,7 +81,8 @@ class Application(object):
# TODO: replace this with some sane logic
if not os.path.splitext(path)[1] in ('.mp3', '.ogg'):
cache_path = f.get_cache_path()
- decoder, encoder = ('ffmpeg',)*2
+ decoder = 'ffmpeg'
+ encoder = config.get('encoder')
if not os.path.exists(cache_path):
f.start_recode(decoder, encoder, environ['sessionid'])
else: