Remove now useless sync_all method
from plextraktsync.decorators.measure_time import measure_time
from plextraktsync.factory import factory
from plextraktsync.logging import logger
-from plextraktsync.plex_api import PlexApi
-from plextraktsync.sync import Sync
from plextraktsync.version import version
from plextraktsync.walker import Walker
-def sync_all(walker: Walker, plex: PlexApi, runner: Sync, dry_run: bool):
- runner.sync(walker, dry_run=dry_run)
-
-
@click.command()
@click.option(
"--library",
@@ -110,9 +104,9 @@ def sync(
print("Enabled dry-run mode: not making actual changes")
w.print_plan(print=tqdm.write)
- plex = factory.plex_api()
with measure_time("Completed full sync"):
try:
- sync_all(walker=w, plex=plex, runner=factory.sync(), dry_run=config.dry_run)
+ runner = factory.sync()
+ runner.sync(walker=w, dry_run=config.dry_run)
except RuntimeError as e:
raise ClickException(str(e))
