Get metadata from meta.json, if it exists #12
1 changed files with 3 additions and 5 deletions
|
|
@ -48,15 +48,13 @@ class Mod:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def author(self) -> str | None:
|
def authors(self) -> list[str] | None:
|
||||||
# TODO: return list with authors
|
|
||||||
if self.__has_meta_json:
|
if self.__has_meta_json:
|
||||||
if "authors" in self.__meta:
|
if "authors" in self.__meta:
|
||||||
authors: list[str] = self.__meta.get("authors", list[str])
|
return self.__meta.get("authors", list[str])
|
||||||
return ", ".join(authors)
|
|
||||||
if "author" not in self.__config:
|
if "author" not in self.__config:
|
||||||
return None
|
return None
|
||||||
return self.__config.get("author", str)
|
return [self.__config.get("author", str)]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def enabled(self) -> bool:
|
def enabled(self) -> bool:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue