Fix source mappings

This commit is contained in:
Johan van Eck 2025-07-27 15:28:15 +03:00
parent f8026fc849
commit e48af3aba1
193 changed files with 548 additions and 523 deletions

View file

@ -4,6 +4,7 @@ import yaml
from markdownify import markdownify
from utils.source import SOURCE_MAPPING
from utils.strings import get_name
IMPLEMENTATION_TO_TAG_MAPPING = {
@ -56,7 +57,9 @@ def collect_custom_format(service, file_name, input_json, output_dir):
elif implementation in ["ResolutionSpecification"]:
condition["resolution"] = f"{spec.get('fields', {}).get('value')}p"
elif implementation in ["SourceSpecification"]:
condition["source"] = spec.get("fields", {}).get("value")
condition["source"] = SOURCE_MAPPING[service][
spec.get("fields", {}).get("value")
]
elif implementation in ["LanguageSpecification"]:
# TODO: exceptLanguage
condition["language"] = spec.get("fields", {}).get("value")