diff options
author | kaleidoscopeit <gabriele@soundcafe.it> | 2021-05-20 18:44:53 +0300 |
---|---|---|
committer | kaleidoscopeit <gabriele@soundcafe.it> | 2021-05-20 18:44:53 +0300 |
commit | 59a0625046ebff8194da50c6fdea224b65e64887 (patch) | |
tree | 441b9611016cb5c3a5d264a18bf5633c6cefaac4 | |
parent | 69beba448c5341145a8ea6654ea89372d964473a (diff) |
Deltacomb configs for VersionUpgrade Plugin
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade49to410/VersionUpgrade49to410.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade49to410/VersionUpgrade49to410.py b/plugins/VersionUpgrade/VersionUpgrade49to410/VersionUpgrade49to410.py index 8e75da6e94..7d9186e06b 100644 --- a/plugins/VersionUpgrade/VersionUpgrade49to410/VersionUpgrade49to410.py +++ b/plugins/VersionUpgrade/VersionUpgrade49to410/VersionUpgrade49to410.py @@ -94,6 +94,16 @@ class VersionUpgrade49to410(VersionUpgrade): } } + _deltacomb_quality_type_conversion = { + "a" : "D005", + "b" : "D010", + "c" : "D015", + "d" : "D020", + "e" : "D030", + "f" : "D045", + "g" : "D060" + } + def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]: """Upgrades instance containers to have the new version number. @@ -123,6 +133,11 @@ class VersionUpgrade49to410(VersionUpgrade): parser["metadata"]["quality_type"] = self._two_trees_bluer_quality_type_conversion.get(parser.get("metadata", "quality_type", fallback = "fast"), "standard") break + if os.path.basename(filename).startswith("deltacomb_"): + parser["general"]["definition"] = "deltacomb_base" + parser["metadata"]["quality_type"] = self._deltacomb_quality_type_conversion.get(parser.get("metadata", "quality_type", fallback = "c"), "D015") + break + result = io.StringIO() parser.write(result) return [filename], [result.getvalue()] |