From b12d65ade22f382e9cd449338010b9f82d904107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 6 Oct 2024 08:57:58 +0200 Subject: [PATCH] [civitai] use tRPC API by default (#6279) --- docs/configuration.rst | 4 ++-- gallery_dl/extractor/civitai.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index fe771518..df974e3f 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -1590,12 +1590,12 @@ extractor.civitai.api Type ``string`` Default - ``"rest"`` + ``"trpc"`` Description Selects which API endpoints to use. * ``"rest"``: `Public REST API `__ - * ``"trpc"``: Internal TRPC API + * ``"trpc"``: Internal tRPC API extractor.civitai.api-key diff --git a/gallery_dl/extractor/civitai.py b/gallery_dl/extractor/civitai.py index 42320a56..e3c8a636 100644 --- a/gallery_dl/extractor/civitai.py +++ b/gallery_dl/extractor/civitai.py @@ -27,12 +27,12 @@ class CivitaiExtractor(Extractor): request_interval = (0.5, 1.5) def _init(self): - if self.config("api") == "trpc": - self.log.debug("Using tRPC API") - self.api = CivitaiTrpcAPI(self) - else: + if self.config("api") == "rest": self.log.debug("Using REST API") self.api = CivitaiRestAPI(self) + else: + self.log.debug("Using tRPC API") + self.api = CivitaiTrpcAPI(self) quality = self.config("quality") if quality: