Lazy load unmatched command
MODIFY
plextraktsync/cli.py
plextraktsync/cli.py
import click
from plextraktsync.commands.self_update import enable_self_update, self_update
-from plextraktsync.commands.unmatched import unmatched
from plextraktsync.commands.watch import watch
from plextraktsync.factory import factory
@@ -186,6 +185,30 @@ def trakt_login():
pass
+@command()
+@click.option(
+ "--no-progress-bar", "no_progress_bar",
+ type=bool,
+ default=False,
+ is_flag=True,
+ help="Don't output progress bars"
+)
+@click.option(
+ "--local",
+ type=bool,
+ default=False,
+ is_flag=True,
+ help="Show only local files (no match in Plex)"
+)
+@click.command()
+def unmatched():
+ """
+ List media that has no match in Trakt or Plex
+ """
+
+ pass
+
+
cli.add_command(cache)
cli.add_command(clear_collections)
cli.add_command(info)

MODIFY
plextraktsync/commands/unmatched.py
plextraktsync/commands/unmatched.py
from plextraktsync.walker import WalkConfig, Walker
-@click.option(
- "--no-progress-bar", "no_progress_bar",
- type=bool,
- default=False,
- is_flag=True,
- help="Don't output progress bars"
-)
-@click.option(
- "--local",
- type=bool,
- default=False,
- is_flag=True,
- help="Show only local files (no match in Plex)"
-)
-@click.command()
def unmatched(no_progress_bar: bool, local: bool):
- """
- List media that has no match in Trakt or Plex
- """
-
config = factory.run_config().update(progressbar=not no_progress_bar)
ensure_login()
plex = factory.plex_api()

Lazy load unmatched command