mirror of
https://github.com/thewesker/Video-Archive-Discord-Bot.git
synced 2025-12-20 04:11:05 -05:00
Fix handling for videos with no duration from youtubedl
This commit is contained in:
@@ -23,7 +23,8 @@ def download(videoUrl):
|
||||
# Just a video
|
||||
video = result
|
||||
|
||||
response['duration'] = video['duration']
|
||||
if('duration' in video):
|
||||
response['duration'] = video['duration']
|
||||
response['fileName'] = video['id'] + ".mp4"
|
||||
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user