Use factory.version.full_version
MODIFY
plextraktsync/cli.py
plextraktsync/cli.py
@@ -53,8 +53,7 @@ def cli(ctx,
"""
if version:
- from .version import version
- print(f"PlexTraktSync {version()}")
+ print(f"PlexTraktSync {factory.version.full_version}")
return
factory.run_config.update(

MODIFY
plextraktsync/commands/info.py
plextraktsync/commands/info.py
from plextraktsync.commands.plex_login import has_plex_token
from plextraktsync.factory import factory, logger
from plextraktsync.path import cache_dir, config_dir, log_dir, servers_config
-from plextraktsync.version import version as get_version
def info(print=logger.info):
- print(f"PlexTraktSync Version: {get_version()}")
+ print(f"PlexTraktSync Version: {factory.version.full_version}")
py_version = sys.version.replace("\n", "")
print(f"Python Version: {py_version}")

MODIFY
plextraktsync/commands/inspect.py
plextraktsync/commands/inspect.py
from plextraktsync.factory import factory
from plextraktsync.util.expand_id import expand_id
-from plextraktsync.version import version
if TYPE_CHECKING:
from typing import List
@@ -90,7 +89,7 @@ def inspect_media(id: str):
def inspect(inputs: List[str]):
print = factory.print
- print(f"PlexTraktSync [{version()}]")
+ print(f"PlexTraktSync [{factory.version.full_version}]")
for id in expand_id(inputs):
inspect_media(id)

MODIFY
plextraktsync/commands/sync.py
plextraktsync/commands/sync.py
from plextraktsync.commands.login import ensure_login
from plextraktsync.decorators.measure_time import measure_time
from plextraktsync.factory import factory, logger
-from plextraktsync.version import version
if TYPE_CHECKING:
from typing import List
@@ -26,7 +25,7 @@ def sync(
Perform sync between Plex and Trakt
"""
- logger.info(f"PlexTraktSync [{version()}]")
+ logger.info(f"PlexTraktSync [{factory.version.full_version}]")
movies = sync_option in ["all", "movies"]
shows = sync_option in ["all", "tv", "shows"]

MODIFY
plextraktsync/version.py
plextraktsync/version.py
def version():
- return factory.version.full_version
+ return factory.full_version.full_version

Use factory.version.full_version