1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[civitai] fix 'model' file download URLs for tRPC API

This commit is contained in:
Mike Fährmann 2024-10-16 15:17:42 +02:00
parent 1824267447
commit a78f33d0fc
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -201,7 +201,9 @@ class CivitaiModelExtractor(CivitaiExtractor):
"file" : file,
"filename" : file["name"],
"extension": "bin",
"url" : file["downloadUrl"],
"url" : file.get("downloadUrl") or
"{}/api/download/models/{}".format(
self.root, version["id"]),
"_http_headers" : {
"Authorization": self.api.headers.get("Authorization")},
"_http_validate": self._validate_file_model,