aboutsummaryrefslogtreecommitdiffhomepage
path: root/source
diff options
context:
space:
mode:
authorBen V. Brown <[email protected]>2022-02-07 21:48:57 +1100
committerBen V. Brown <[email protected]>2022-02-07 21:48:57 +1100
commitd8e0d860846ac7c97c61c8022280a6489059bc05 (patch)
treed4686cb96f396fafda1c1ff201187bee27476396 /source
parentee0eeec08f3168396be51a6ccc07404b9f13f60f (diff)
downloadIronOS-d8e0d860846ac7c97c61c8022280a6489059bc05.tar.gz
IronOS-d8e0d860846ac7c97c61c8022280a6489059bc05.zip
Update metadata.py
Diffstat (limited to 'source')
-rwxr-xr-xsource/metadata.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/metadata.py b/source/metadata.py
index 09458a18..9349bef8 100755
--- a/source/metadata.py
+++ b/source/metadata.py
@@ -69,8 +69,11 @@ for file_path in output_files:
if len(matches) == 3:
if device_model_name is None:
device_model_name = matches[0]
- lang_code = matches[1]
+ lang_code: str = matches[1]
lang_file = parsed_languages.get(lang_code, None)
+ if lang_file is None and lang_code.startswith("multi_"):
+ # Multi files wont match, but we fake this by just taking the filename to it
+ lang_file = {"languageLocalName": lang_code.replace("multi_", "").replace("compressed_", "")}
if lang_file is None:
raise Exception(f"Could not match language code {lang_code}")
file_record = {"language_code": lang_code, "language_name": lang_file.get("languageLocalName", None)}