home
·
contact
·
privacy
projects
/
ytplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb1a674
)
Fix /yt_result showing file path even if file not .present.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 30 Nov 2024 18:23:21 +0000
(19:23 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 30 Nov 2024 18:23:21 +0000
(19:23 +0100)
src/ytplom/http.py
patch
|
blob
|
history
diff --git
a/src/ytplom/http.py
b/src/ytplom/http.py
index 9027c98d8a731cf4cf8c410ae798b8d4cf05eda6..b2366d56376936b3dae6767b4ee7e7fc80d4a770 100644
(file)
--- 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()