Use console from factory
MODIFY
plextraktsync/factory.py
plextraktsync/factory.py
@@ -131,8 +131,6 @@ def progressbar(self):
from tqdm import TqdmExperimentalWarning
from tqdm.rich import tqdm
- from plextraktsync.console import console
-
warnings.filterwarnings("ignore", category=TqdmExperimentalWarning)
# Monkeypatch https://github.com/tqdm/tqdm/pull/1395
@@ -143,7 +141,7 @@ def close(self):
self.display()
super().close()
- return partial(Tqdm, options={'console': console})
+ return partial(Tqdm, options={'console': self.console})
@cached_property
def run_config(self):
@@ -245,12 +243,11 @@ def logger(self):
def console_logger(self):
from rich.logging import RichHandler
- from plextraktsync.console import console
from plextraktsync.rich_addons import RichHighlighter
config = self.config
handler = RichHandler(
- console=console,
+ console=self.console,
show_time=config.log_console_time,
log_time_format='[%Y-%m-%d %X]',
show_path=False,

Use console from factory