|
|
@ -47,7 +47,7 @@ def download():
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/download_file/<filename>')
|
|
|
|
@app.route('/download_file/<filename>')
|
|
|
|
def download_file(filename):
|
|
|
|
def download_file(filename):
|
|
|
|
return send_from_directory(app.config['DATA_DIR'], filename,
|
|
|
|
return send_from_directory(app.config['TMP_DIR'], filename,
|
|
|
|
as_attachment=True)
|
|
|
|
as_attachment=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -93,7 +93,7 @@ def prepare_download(form):
|
|
|
|
source['fn']) for source in sources])]
|
|
|
|
source['fn']) for source in sources])]
|
|
|
|
c += ['-codec', 'copy']
|
|
|
|
c += ['-codec', 'copy']
|
|
|
|
c += ['-t', str(form.length.data * 60)]
|
|
|
|
c += ['-t', str(form.length.data * 60)]
|
|
|
|
c += [os.path.join(app.config['DATA_DIR'], output_filename)]
|
|
|
|
c += [os.path.join(app.config['TMP_DIR'], output_filename)]
|
|
|
|
|
|
|
|
|
|
|
|
app.logger.debug(' '.join(c))
|
|
|
|
app.logger.debug(' '.join(c))
|
|
|
|
subprocess.call(c)
|
|
|
|
subprocess.call(c)
|
|
|
|