From c4ed9f4faab4562aea6108d7737252d43641da2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 24 Jul 2020 18:05:53 +0200 Subject: [PATCH] [inkbunny] add 'metadata' option (#283) --- docs/configuration.rst | 9 +++++++++ gallery_dl/extractor/inkbunny.py | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/docs/configuration.rst b/docs/configuration.rst index 08075129..c0fd79d8 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -873,6 +873,15 @@ Description Controls whether to choose the GIF or MP4 version of an animation. =========== ===== +extractor.inkbunny.metadata +--------------------------- +=========== ===== +Type ``bool`` +Default ``false`` +Description Fetch ``description``, ``writing``, and ``pools`` metadata fields. +=========== ===== + + extractor.inkbunny.orderby -------------------------- =========== ===== diff --git a/gallery_dl/extractor/inkbunny.py b/gallery_dl/extractor/inkbunny.py index 536ee587..038e2089 100644 --- a/gallery_dl/extractor/inkbunny.py +++ b/gallery_dl/extractor/inkbunny.py @@ -171,10 +171,15 @@ class InkbunnyAPI(): def __init__(self, extractor): self.extractor = extractor self.session_id = None + self.metadata = extractor.config("metadata") def detail(self, submission_ids): """Get full details about submissions with the given IDs""" params = {"submission_ids": submission_ids} + if self.metadata: + params["show_description"] = "yes" + params["show_writing"] = "yes" + params["show_pools"] = "yes" return self._call("submissions", params)["submissions"] def search(self, params):