Don't calculate mimetype if file is None

This commit is contained in:
blank X 2021-10-20 21:12:39 +07:00
parent d4f2f25ac4
commit f2ce155d90
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ async def main():
j = j[0]
k = k[0]
attributes = []
mimetype = await _get_file_mimetype(k)
mimetype = (await _get_file_mimetype(k)) if k else ''
if mimetype.startswith('video/'):
try:
data = await _get_video_data(k)