diff --git a/encoding.py b/encoding.py index 26f93332b760331d0711685e3d9ce2bf6306c721..83d5e938dd800387bbb292ddbf8a7132ef994851 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']