def edit_test_life_stream(method: str, stream: TimeshiftRecorderStream): form = TestLifeStreamForm(obj=stream) if method == 'POST': # FIXME form.validate_on_submit() stream = form.update_entry(stream) service.update_stream(stream) return jsonify(status='ok'), 200 return render_template('stream/test_life/edit.html', form=form, feedback_dir=stream.generate_feedback_dir())
def edit_encode_stream(method: str, stream: EncodeStream): form = EncodeStreamForm(obj=stream) if method == 'POST' and form.validate_on_submit(): stream = form.update_entry(stream) service.update_stream(stream) return jsonify(status='ok'), 200 return render_template('stream/encode/edit.html', form=form, feedback_dir=stream.generate_feedback_dir())
def edit_catchup_stream(method: str, stream: CatchupStream): form = CatchupStreamForm(obj=stream) if method == 'POST': # FIXME form.validate_on_submit() stream = form.update_entry(stream) service.update_stream(stream) return jsonify(status='ok'), 200 return render_template('stream/catchup/edit.html', form=form, feedback_dir=stream.generate_feedback_dir(), timeshift_dir=stream.generate_timeshift_dir())