OP-4643 - add custom_tags

This commit is contained in:
Petr Kalis 2023-01-06 14:15:33 +01:00
parent 52a5865341
commit 0f1dcb64eb

View file

@ -72,6 +72,7 @@ class ExtractColorTranscode(publish.Extractor):
target_colorspace = profile["output_colorspace"]
if not target_colorspace:
raise RuntimeError("Target colorspace must be set")
custom_tags = profile["custom_tags"]
repres = instance.data.get("representations") or []
for idx, repre in enumerate(repres):
@ -109,6 +110,11 @@ class ExtractColorTranscode(publish.Extractor):
self.log
)
if custom_tags:
if not repre.get("custom_tags"):
repre["custom_tags"] = []
repre["custom_tags"].extend(custom_tags)
def repre_is_valid(self, repre):
"""Validation if representation should be processed.