[civitai] use tRPC API by default (#6279)
This commit is contained in:
@@ -1590,12 +1590,12 @@ extractor.civitai.api
|
|||||||
Type
|
Type
|
||||||
``string``
|
``string``
|
||||||
Default
|
Default
|
||||||
``"rest"``
|
``"trpc"``
|
||||||
Description
|
Description
|
||||||
Selects which API endpoints to use.
|
Selects which API endpoints to use.
|
||||||
|
|
||||||
* ``"rest"``: `Public REST API <https://developer.civitai.com/docs/api/public-rest>`__
|
* ``"rest"``: `Public REST API <https://developer.civitai.com/docs/api/public-rest>`__
|
||||||
* ``"trpc"``: Internal TRPC API
|
* ``"trpc"``: Internal tRPC API
|
||||||
|
|
||||||
|
|
||||||
extractor.civitai.api-key
|
extractor.civitai.api-key
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ class CivitaiExtractor(Extractor):
|
|||||||
request_interval = (0.5, 1.5)
|
request_interval = (0.5, 1.5)
|
||||||
|
|
||||||
def _init(self):
|
def _init(self):
|
||||||
if self.config("api") == "trpc":
|
if self.config("api") == "rest":
|
||||||
self.log.debug("Using tRPC API")
|
|
||||||
self.api = CivitaiTrpcAPI(self)
|
|
||||||
else:
|
|
||||||
self.log.debug("Using REST API")
|
self.log.debug("Using REST API")
|
||||||
self.api = CivitaiRestAPI(self)
|
self.api = CivitaiRestAPI(self)
|
||||||
|
else:
|
||||||
|
self.log.debug("Using tRPC API")
|
||||||
|
self.api = CivitaiTrpcAPI(self)
|
||||||
|
|
||||||
quality = self.config("quality")
|
quality = self.config("quality")
|
||||||
if quality:
|
if quality:
|
||||||
|
|||||||
Reference in New Issue
Block a user