From fc67c4aeef498f2c52adf1502e6325ea3325dd0f Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 30 Nov 2024 19:23:21 +0100 Subject: [PATCH] Fix /yt_result showing file path even if file not .present. --- src/ytplom/http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ytplom/http.py b/src/ytplom/http.py index 9027c98..b2366d5 100644 --- a/src/ytplom/http.py +++ b/src/ytplom/http.py @@ -310,7 +310,8 @@ class _TaskHandler(BaseHTTPRequestHandler): except NotFoundException: video_data = YoutubeVideo(video_id) try: - file_path = VideoFile.get_by_yt_id(conn, video_id).full_path + file = VideoFile.get_by_yt_id(conn, video_id) + file_path = file.full_path if file.present else None except NotFoundException: file_path = None conn.commit_close() -- 2.30.2