Add console and print to factory
@@ -21,6 +21,18 @@ def invalidate(self, keys: List[str] = None):
except KeyError:
pass
+ @cached_property
+ def console(self):
+ from rich.console import Console
+
+ from plextraktsync.rich_addons import RichHighlighter
+
+ return Console(highlighter=RichHighlighter())
+
+ @cached_property
+ def print(self):
+ return self.console.print
+
@cached_property
def trakt_api(self):
from plextraktsync.trakt.TraktApi import TraktApi
