mirror of
https://github.com/Dineshkarthik/telegram_media_downloader.git
synced 2024-12-28 17:51:03 +08:00
fix: missing filename attribute
This commit is contained in:
parent
1df2762963
commit
cf46b35639
1 changed files with 3 additions and 3 deletions
|
@ -61,10 +61,10 @@ async def _get_media_meta(
|
|||
dt.utcfromtimestamp(media_obj.date).isoformat(), file_format
|
||||
),
|
||||
)
|
||||
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)
|
||||
file_name = os.path.join(
|
||||
THIS_DIR, _type, getattr(media_obj, "file_name", None) or ""
|
||||
)
|
||||
return file_ref, file_name, file_format
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue