diff --git a/app/tasks/minetestcheck/tree.py b/app/tasks/minetestcheck/tree.py index 66dcbc8f..e4bfab7e 100644 --- a/app/tasks/minetestcheck/tree.py +++ b/app/tasks/minetestcheck/tree.py @@ -72,7 +72,7 @@ class PackageTreeNode: # .conf file try: - with open(self.getMetaFilePath(), "r") as myfile: + with open(self.getMetaFilePath() or "", "r") as myfile: conf = parse_conf(myfile.read()) for key, value in conf.items(): result[key] = value @@ -116,6 +116,11 @@ class PackageTreeNode: if "optional_depends" in result: result["optional_depends"] = [x.strip() for x in result["optional_depends"].split(",")] + # Fix games using "name" as "title" + if self.type == ContentType.GAME: + result["title"] = result["name"] + del result["name"] + # Calculate Title if "name" in result and not "title" in result: result["title"] = result["name"].replace("_", " ").title()