Lazy load inspect command
MODIFY
plextraktsync/cli.py
plextraktsync/cli.py
from functools import wraps
import click
-from plextraktsync.commands.inspect import inspect
from plextraktsync.commands.login import login
from plextraktsync.commands.plex_login import plex_login
from plextraktsync.commands.self_update import enable_self_update, self_update
@@ -89,6 +88,23 @@ def info():
pass
+@command()
+@click.argument('input', nargs=-1)
+@click.option(
+ "--watched-shows",
+ type=bool,
+ default=False,
+ is_flag=True,
+ help="Print Trakt watched_shows and exit"
+)
+def inspect():
+ """
+ Inspect details of an object
+ """
+
+ pass
+
+
cli.add_command(cache)
cli.add_command(clear_collections)
cli.add_command(info)

MODIFY
plextraktsync/commands/inspect.py
plextraktsync/commands/inspect.py
-import click
-
from plextraktsync.factory import factory
from plextraktsync.version import version
@@ -82,20 +80,7 @@ def inspect_media(id):
print(f"- {h.viewedAt} by {h.account.name} on {h.device.name} with {h.device.platform}")
-@click.command()
-@click.argument('input', nargs=-1)
-@click.option(
- "--watched-shows",
- type=bool,
- default=False,
- is_flag=True,
- help="Print Trakt watched_shows and exit"
-)
def inspect(input, watched_shows: bool):
- """
- Inspect details of an object
- """
-
print(f"PlexTraktSync [{version()}]")
if watched_shows:

Lazy load inspect command