diff --git a/comictaggerlib/log.py b/comictaggerlib/log.py index efdf98b..1bb9f53 100644 --- a/comictaggerlib/log.py +++ b/comictaggerlib/log.py @@ -2,6 +2,10 @@ from __future__ import annotations import logging.handlers import pathlib +import platform +import sys + +from comictaggerlib.ctversion import version logger = logging.getLogger("comictagger") @@ -44,3 +48,10 @@ def setup_logging(verbose: int, log_dir: pathlib.Path) -> None: format="%(asctime)s | %(name)s | %(levelname)s | %(message)s", datefmt="%Y-%m-%dT%H:%M:%S", ) + + logger.info( + "ComicTagger Version: %s running on: %s PyInstaller: %s", + version, + platform.system(), + "Yes" if getattr(sys, "frozen", None) else "No", + ) diff --git a/comictaggerlib/main.py b/comictaggerlib/main.py index 639ebb3..7ed6030 100644 --- a/comictaggerlib/main.py +++ b/comictaggerlib/main.py @@ -18,14 +18,13 @@ from __future__ import annotations import argparse import json import logging.handlers -import platform import signal import sys import settngs +import comicapi import comictalker.comictalkerapi as ct_api -from comicapi import utils from comictaggerlib import cli, ctoptions from comictaggerlib.ctversion import version from comictaggerlib.log import setup_logging @@ -53,7 +52,7 @@ def update_publishers(options: settngs.Namespace) -> None: json_file = options.runtime_config.user_config_dir / "publishers.json" if json_file.exists(): try: - utils.update_publishers(json.loads(json_file.read_text("utf-8"))) + comicapi.utils.update_publishers(json.loads(json_file.read_text("utf-8"))) except Exception: logger.exception("Failed to load publishers from %s", json_file) # show_exception_box(str(e)) @@ -118,18 +117,11 @@ class App: signal.signal(signal.SIGINT, signal.SIG_DFL) - logger.info( - "ComicTagger Version: %s running on: %s PyInstaller: %s", - version, - platform.system(), - "Yes" if getattr(sys, "frozen", None) else "No", - ) - logger.debug("Installed Packages") for pkg in sorted(importlib_metadata.distributions(), key=lambda x: x.name): logger.debug("%s\t%s", pkg.metadata["Name"], pkg.metadata["Version"]) - utils.load_publishers() + comicapi.utils.load_publishers() update_publishers(self.options[0]) if not qt_available and not self.options[0].runtime_no_gui: