From a2b8fa46ce5bb9993839e1c70fb5c74831d363e3 Mon Sep 17 00:00:00 2001 From: deflax Date: Thu, 6 Feb 2025 14:59:11 +0000 Subject: [PATCH] Fix the template variables for the route functions --- src/api/api.py | 8 ++++---- src/api/templates/index.html | 4 ++-- src/api/templates/watch.html | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/api/api.py b/src/api/api.py index 43cbad1..38b5cfe 100644 --- a/src/api/api.py +++ b/src/api/api.py @@ -289,10 +289,10 @@ def video_download_route(video_file): logger_content.warning('[' + client_address(request) + '] download' + str(video_path)) return send_file(reqfile, as_attachment=True, download_name=file_name) -@app.route("/video/watch/", methods=['GET']) -def video_watch_route(file_name_no_extension): - video_file = f'{file_name_no_extension}.mp4' - thumb_file = f'{file_name_no_extension}.png' +@app.route("/video/watch/", methods=['GET']) +def video_watch_route(video_file_no_extension): + video_file = f'{video_file_no_extension}.mp4' + thumb_file = f'{video_file_no_extension}.png' video_path = f'{rec_path}/vod/{video_file}' thumb_path = f'{rec_path}/thumb/{thumb_file}' if not os.path.exists(video_path): diff --git a/src/api/templates/index.html b/src/api/templates/index.html index 99f84ac..1e6bc17 100644 --- a/src/api/templates/index.html +++ b/src/api/templates/index.html @@ -255,8 +255,8 @@ document.addEventListener('DOMContentLoaded', () => {