diff --git a/src/discordbot/discordbot.py b/src/discordbot/discordbot.py index 5a68a6e..2026079 100644 --- a/src/discordbot/discordbot.py +++ b/src/discordbot/discordbot.py @@ -147,7 +147,8 @@ async def query_database(): # Creating an embed video_url = f'https://{scheduler_hostname}/video/{video_filename}' thumb_url = f'https://{scheduler_hostname}/thumb/{thumb_filename}' - watch_url = f'https://{scheduler_hostname}/watch/{video_filename}' + video_filename_no_extension = video_filename.split('.')[0] + watch_url = f'https://{scheduler_hostname}/watch/{video_filename_no_extension}' img_url = f'https://{scheduler_hostname}/img' embed = discord.Embed(title=f'{rec_stream_name}', url=f'{watch_url}', diff --git a/src/scheduler/scheduler.py b/src/scheduler/scheduler.py index 0b84c8b..eeeb118 100644 --- a/src/scheduler/scheduler.py +++ b/src/scheduler/scheduler.py @@ -331,8 +331,9 @@ def img_route(file_name): abort(404) return send_file(reqfile, mimetype='image/png') -@app.route('/watch/') -def watch_route(file_name): +@app.route('/watch/') +def watch_route(file_name_no_extension): + file_name = file_name_no_extension + '.mp4' reqfile = f'{rec_path}/vod/{file_name}' if not os.path.exists(reqfile): abort(404) diff --git a/src/scheduler/templates/watch.html b/src/scheduler/templates/watch.html index f45eaf3..67db055 100644 --- a/src/scheduler/templates/watch.html +++ b/src/scheduler/templates/watch.html @@ -4,6 +4,7 @@ +