From 1f80488bbf415d2af135307abc3efffd586eea7a Mon Sep 17 00:00:00 2001 From: boyska Date: Mon, 24 Feb 2014 15:20:45 +0100 Subject: [PATCH] output name and download disposition --- server/default_config.py | 2 +- server/server.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/default_config.py b/server/default_config.py index 8a96d51..f939e8c 100644 --- a/server/default_config.py +++ b/server/default_config.py @@ -5,6 +5,6 @@ DB_URI = 'sqlite:///techrec.db' AUDIO_OUTPUT = 'output/' AUDIO_INPUT = 'rec/' AUDIO_INPUT_FORMAT = '%Y-%m/%d/rec-%Y-%m-%d-%H-%M-%S.mp3' -AUDIO_OUTPUT_FORMAT = 'techrec-%(time)s-%(name)s' +AUDIO_OUTPUT_FORMAT = 'techrec-%(time)s-%(name)s.mp3' FORGE_TIMEOUT = 20 FORGE_MAX_DURATION = 3600*5 diff --git a/server/server.py b/server/server.py index 609304c..f9b2f23 100644 --- a/server/server.py +++ b/server/server.py @@ -259,7 +259,8 @@ class RecServer: self._app.route('/output/', callback=lambda filepath: static_file(filepath, - root=get_config()['AUDIO_OUTPUT'])) + root=get_config()['AUDIO_OUTPUT'], + download=True)) self._app.route('/static/', callback=lambda filepath: static_file(filepath, root='static/'))