From eec37ad4d9425736bfa07a542ceb53badae95fde Mon Sep 17 00:00:00 2001 From: root Date: Sat, 17 May 2025 22:03:31 +0000 Subject: [PATCH] add comments --- src/api/app/flask_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/app/flask_api.py b/src/api/app/flask_api.py index 1795a52..3349f46 100644 --- a/src/api/app/flask_api.py +++ b/src/api/app/flask_api.py @@ -272,7 +272,7 @@ def thumb_route(thumb_file): logger_content.warning('[' + client_address(request) + '] thumb' + str(thumb_path)) return send_file(thumb_path, mimetype='image/png') -# Video +# Video streamer @app.route("/video/", methods=['GET']) def video_route(video_file): video_path = f'{rec_path}/vod/{video_file}' @@ -281,6 +281,7 @@ def video_route(video_file): logger_content.warning('[' + client_address(request) + '] stream' + str(video_path)) return send_file(video_path, mimetype='video/mp4') +# Video download @app.route("/video/download/", methods=['GET']) def video_download_route(video_file): video_path = f'{rec_path}/vod/{video_file}' @@ -289,6 +290,7 @@ def video_download_route(video_file): logger_content.warning('[' + client_address(request) + '] download' + str(video_path)) return send_file(video_path, as_attachment=True, download_name=video_file) +# Video player @app.route("/video/watch/", methods=['GET']) def video_watch_route(video_file_no_extension): video_file = f'{video_file_no_extension}.mp4'