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
|
||||
|
||||
@property
|
||||
def author(self) -> str | None:
|
||||
# TODO: return list with authors
|
||||
def authors(self) -> list[str] | None:
|
||||
if self.__has_meta_json:
|
||||
if "authors" in self.__meta:
|
||||
authors: list[str] = self.__meta.get("authors", list[str])
|
||||
return ", ".join(authors)
|
||||
return self.__meta.get("authors", list[str])
|
||||
if "author" not in self.__config:
|
||||
return None
|
||||
return self.__config.get("author", str)
|
||||
return [self.__config.get("author", str)]
|
||||
|
||||
@property
|
||||
def enabled(self) -> bool:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue