fix info extracting expired to use epoch as it is the ended instead of timestamp.
This commit is contained in:
parent
19b9f8dc6c
commit
30830a94e8
1 changed files with 1 additions and 1 deletions
|
|
@ -229,7 +229,7 @@ class Download:
|
|||
|
||||
# Safe-guard incase downloading take too long and the info expires.
|
||||
if self.info_dict and isinstance(self.info_dict, dict) and self.download_info_expires > 0:
|
||||
_ts: int | None = self.info_dict.get("timestamp")
|
||||
_ts: int | None = self.info_dict.get("epoch", self.info_dict.get("timestamp", None))
|
||||
_ts = datetime.fromtimestamp(_ts, tz=UTC) if _ts else None
|
||||
if not _ts or (datetime.now(tz=UTC) - _ts).total_seconds() > self.download_info_expires:
|
||||
self.info_dict = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue