From 67fd039b95479b7094f30d98c37dfdf44454c964 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sun, 13 Nov 2022 13:48:52 -0700 Subject: [PATCH] Remove duplicate function --- frigate/http.py | 38 -------------------------------------- web/src/routes/System.jsx | 10 +++------- 2 files changed, 3 insertions(+), 45 deletions(-) diff --git a/frigate/http.py b/frigate/http.py index 699cb4cbc..966421926 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -613,44 +613,6 @@ def stats(): return jsonify(stats) -@bp.route("//ffprobe") -def ffprobe(camera_name): - if camera_name not in current_app.frigate_config.cameras: - return jsonify( - {"success": False, "message": f"Camera name {camera_name} not found"}, "404" - ) - - config: CameraConfig = current_app.frigate_config.cameras[camera_name] - - if len(config.ffmpeg.inputs) > 1: - # user has multiple streams - output = [] - - for input in config.ffmpeg.inputs: - ffprobe = ffprobe_stream(input.path) - output.append( - { - "input_roles": input.roles, - "return_code": ffprobe.returncode, - "stderr": ffprobe.stderr.decode().strip(), - "stdout": ffprobe.stdout.decode().strip(), - } - ) - - return jsonify(output) - else: - # user has single stream - ffprobe: sp.CompletedProcess = ffprobe_stream(config.ffmpeg.inputs[0].path) - return jsonify( - { - "input_roles": config.ffmpeg.inputs[0].roles, - "return_code": ffprobe.returncode, - "stderr": ffprobe.stderr.decode().strip(), - "stdout": ffprobe.stdout.decode().strip(), - } - ) - - @bp.route("/") def mjpeg_feed(camera_name): fps = int(request.args.get("fps", "3")) diff --git a/web/src/routes/System.jsx b/web/src/routes/System.jsx index 072bb75dd..b9211ac8c 100644 --- a/web/src/routes/System.jsx +++ b/web/src/routes/System.jsx @@ -82,9 +82,9 @@ export default function System() { const response = axios.get('vainfo'); if (response.status === 200) { - setState({ ...state, showVainfo: true, vainfo: JSON.stringify(resonse.data, null, 2)}) + setState({ ...state, showVainfo: true, vainfo: JSON.stringify(resonse.data, null, 2) }); } else { - setState({ ...state, showVainfo: true, vainfo: 'There was an error getting the vainfo output.'}) + setState({ ...state, showVainfo: true, vainfo: 'There was an error getting the vainfo output.' }); } }; @@ -125,11 +125,7 @@ export default function System() { -