Get metadata from meta.json, if it exists #12

Merged
Toast merged 5 commits from localMetadata into main 2025-05-30 22:00:06 +02:00
Showing only changes of commit 76fba3ed84 - Show all commits

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: