diff --git a/src/livepng/model.py b/src/livepng/model.py index 53fbec8..2744e96 100644 --- a/src/livepng/model.py +++ b/src/livepng/model.py @@ -18,12 +18,15 @@ class LivePNG: observers : list[LivePNGModelObserver] callbackfunctions : list[Callable] + name : str + version : int styles : dict[str, Style] = {} current_style : Style current_expression : Expression current_variant : Variant output_type : FilepathOutput path : str + __speak_lock : Semaphore __request_interrupt : bool @@ -53,6 +56,8 @@ def __init__(self, path: str, output_type:FilepathOutput=FilepathOutput.LOCAL_PA def load_model(self): """Load the model""" + self.version = self.model_info["version"] + self.name = self.model_info["name"] for style in self.model_info["styles"]: stl = Style(style, self.model_info["styles"][style]["expressions"]) self.styles[style] = stl @@ -64,6 +69,14 @@ def load_defaults(self): self.current_variant = self.current_expression.get_default_variant() # Main getters and setters + + def get_name(self) -> str: + """Return model name""" + return self.name + + def get_version(self) -> int: + """Return model version""" + return self.version def get_styles(self) -> dict[str, Style]: """Get the list of available styles diff --git a/src/setup.py b/src/setup.py index 48fae21..b220d4a 100644 --- a/src/setup.py +++ b/src/setup.py @@ -3,7 +3,7 @@ setup( name = 'livepng', packages = ['livepng'], - version = '0.1.5', + version = '0.1.6', license='GGPLv3', description = 'LivePNG is a format to create avatars based on PNG images with lipsync support', long_description=open('README.md').read(), @@ -11,7 +11,7 @@ author = 'Francesco Caracciolo', author_email = 'francescocaracciolo78@gmail.com', url = 'https://github.com/francescocaracciolo/livepng', - download_url = 'https://github.com/FrancescoCaracciolo/LivePNG/archive/refs/tags/0.1.5.tar.gz', + download_url = 'https://github.com/FrancescoCaracciolo/LivePNG/archive/refs/tags/0.1.6.tar.gz', keywords = ['avatar', 'png', 'lipsync', 'livepng', 'anime'], install_requires=[ 'pydub',