[dl:http] fix setting 'mtime' per file (#7529)

introduce '_http_lastmodified' meta field
This commit is contained in:
Mike Fährmann
2025-05-21 13:41:26 +02:00
parent 29d315e495
commit b76e7de1a7
2 changed files with 5 additions and 2 deletions

View File

@@ -322,7 +322,10 @@ class HttpDownloader(DownloaderBase):
self.downloading = False
if self.mtime:
kwdict.setdefault("_mtime", response.headers.get("Last-Modified"))
if "_http_lastmodified" in kwdict:
kwdict["_mtime"] = kwdict["_http_lastmodified"]
else:
kwdict["_mtime"] = response.headers.get("Last-Modified")
else:
kwdict["_mtime"] = None

View File

@@ -169,7 +169,7 @@ class AryionExtractor(Extractor):
"<p>", "</p>"), "", "")),
"filename" : fname,
"extension": ext,
"_mtime" : lmod,
"_http_lastmodified": lmod,
}