Commit dcb0516d authored by Julian Rother's avatar Julian Rother
Browse files

Merge branch 'master' into refactor_jobs

parents 2b9def6b 02b9cf2a
......@@ -113,3 +113,12 @@ def jobs_schedule(hostname):
return 'no jobs', 503
return Response(json.dumps(job, default=date_json_handler), mimetype='application/json')
@app.route('/internal/jobs/add/forward', methods=['GET', 'POST'])
@mod_required
@csrf_protect
def add_forward_job():
schedule_job('live_forward', {'src': request.values['src'],
'dest': request.values['dest'], 'format': 'flv'}, priority=9)
return redirect(request.values.get('ref', url_for('jobs_overview')))
......@@ -13,9 +13,10 @@
</div>
<div class="modal-body">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#add_thumbnail" aria-controls="thumbnail" role="tab" data-toggle="tab">Thumbnail</a></li>
<li role="presentation"><a href="#add_remux" aria-controls="remux" role="tab" data-toggle="tab">Remux</a></li>
<li role="presentation"><a href="#add_reencode" aria-controls="remux" role="tab" data-toggle="tab">Reencode</a></li>
<li role="presentation" class="active"><a href="#add_thumbnail" role="tab" data-toggle="tab">Thumbnail</a></li>
<li role="presentation"><a href="#add_remux" role="tab" data-toggle="tab">Remux</a></li>
<li role="presentation"><a href="#add_reencode" role="tab" data-toggle="tab">Reencode</a></li>
<li role="presentation"><a href="#add_forward" role="tab" data-toggle="tab">Stream-Weiterleitung</a></li>
</ul>
<div class="tab-content" style="margin-top: 10px;">
<div role="tabpanel" class="tab-pane active" id="add_thumbnail">
......@@ -48,6 +49,15 @@
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane" id="add_forward">
<form class="form-inline" action="{{url_for('add_forward_job', ref=request.url)}}" method="post">
<div class="form-group">
<input type="text" class="form-control" placeholder="Quelle" name="src">
<input type="text" class="form-control" placeholder="Ziel" name="dest">
<button type="submit" class="btn btn-primary">Livestream weiterleiten</button>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment