fix: media_obj filename

This commit is contained in:
DK 2020-05-25 22:00:24 +02:00 committed by GitHub
parent 6b7a211fba
commit 34eb0e559c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,7 @@ async def _get_media_meta(
dt.utcfromtimestamp(media_obj.date).isoformat(), file_format
),
)
elif _type == "photo":
elif _type in ["photo", "video"]:
file_name = os.path.join(THIS_DIR, _type, "")
else:
file_name = os.path.join(THIS_DIR, _type, media_obj.file_name)