[common] use 'parent' value as 'parent-metadata' default (#8525 #8604)

enable 'parent-metadata' by default for
'chevereto' & 'imagehost' (album/gallery) extractors
This commit is contained in:
Mike Fährmann
2025-12-08 20:07:56 +01:00
parent f5f4122cb6
commit b1b70528a6
6 changed files with 20 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ class CheveretoExtractor(BaseExtractor):
basecategory = "chevereto"
directory_fmt = ("{category}", "{user}", "{album}")
archive_fmt = "{id}"
parent = True
def _init(self):
self.path = self.groups[-1]

View File

@@ -33,6 +33,7 @@ class Extractor():
basecategory = ""
basesubcategory = ""
categorytransfer = False
parent = False
directory_fmt = ("{category}",)
filename_fmt = "{filename}.{extension}"
archive_fmt = ""

View File

@@ -19,6 +19,7 @@ class ImagehostImageExtractor(Extractor):
basecategory = "imagehost"
subcategory = "image"
archive_fmt = "{token}"
parent = True
_https = True
_params = None
_cookies = None

View File

@@ -452,7 +452,8 @@ class DownloadJob(Job):
else:
extr._parentdir = pextr._parentdir
if pmeta := pextr.config2("parent-metadata", "metadata-parent"):
if pmeta := pextr.config2(
"parent-metadata", "metadata-parent", pextr.parent):
if isinstance(pmeta, str):
data = self.kwdict.copy()
if kwdict: