From 0704647117d14e310346b05bfd6305d59215a36a Mon Sep 17 00:00:00 2001 From: Julian Rother <julianr@fsmpi.rwth-aachen.de> Date: Tue, 2 Jan 2018 04:17:58 +0100 Subject: [PATCH] Fixed remuxing code --- encoding.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/encoding.py b/encoding.py index 26f9333..83d5e93 100644 --- a/encoding.py +++ b/encoding.py @@ -17,7 +17,7 @@ def schedule_remux(lectureid=None, videoid=None): ret = None if not lectureid: lectureid = request.values.get('lectureid') - videoid = request.values.get('videoid') + videoid = int(request.values.get('videoid', 0)) if not lectureid: lectureid = query('SELECT lecture_id FROM videos WHERE id = ?', videoid)[0]['lecture_id'] ret = redirect(request.values.get('ref', url_for('jobs_overview'))) @@ -33,7 +33,8 @@ def schedule_remux(lectureid=None, videoid=None): continue if videoid and video['id'] != videoid: continue - data = {'path': video['path'], 'srcpath': video['srcpath'], 'srchash': video['srchash']} + data = {'path': video['path'], 'srcpath': video['srcpath'], + 'srchash': video['srchash'], 'video_id': video['id']} fmt = json.loads(video['fmtopts']) if 'format' in fmt: data['format'] = fmt['format'] -- GitLab