Mod: return list of authors

Closes #13
This commit is contained in:
Toast 2025-05-30 21:53:06 +02:00
parent bb858ef261
commit 76fba3ed84

View file

@ -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: