mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +01:00
Fix incorrect game names detected by MinetestCheck
This commit is contained in:
parent
3914659718
commit
85551539f0
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user