Add multiple --ids support for sync
+from typing import List
+
import click
from click import ClickException
from tqdm import tqdm
@@ -35,8 +37,9 @@ def sync_all(walker: Walker, plex: PlexApi, runner: Sync, dry_run: bool):
show_default=True, help="Sync specific movie only"
)
@click.option(
- "--id",
+ "--id", "ids",
type=str,
+ multiple=True,
show_default=True, help="Sync specific item only"
)
@click.option(
@@ -70,7 +73,7 @@ def sync(
library: str,
show: str,
movie: str,
- id: str,
+ ids: List[str],
batch_size: int,
dry_run: bool,
no_progress_bar: bool,
@@ -95,7 +98,8 @@ def sync(
wc = WalkConfig(movies=movies, shows=tv)
w = Walker(plex=plex, trakt=trakt, mf=mf, config=wc, progressbar=pb)
- if id:
+ if ids:
+ for id in ids:
wc.add_id(id)
if library:
wc.add_library(library)
