mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Fix PhotoSize not having date anymore
This commit is contained in:
parent
6943e16636
commit
c660d3a7d0
@ -711,7 +711,9 @@ class Client(Methods, BaseClient):
|
|||||||
|
|
||||||
file_name = "{}_{}_{}{}".format(
|
file_name = "{}_{}_{}{}".format(
|
||||||
media_type_str,
|
media_type_str,
|
||||||
datetime.fromtimestamp(media.date or time.time()).strftime("%Y-%m-%d_%H-%M-%S"),
|
datetime.fromtimestamp(
|
||||||
|
getattr(media, "date", None) or time.time()
|
||||||
|
).strftime("%Y-%m-%d_%H-%M-%S"),
|
||||||
self.rnd_id(),
|
self.rnd_id(),
|
||||||
extension
|
extension
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user