Add global --no-cache option
@@ -38,8 +38,9 @@ def wrap(*args, **kwargs):
@click.group(invoke_without_command=True)
@click.option("--version", is_flag=True, help="Print version and exit")
+@click.option("--no-cache", is_flag=True, help="Disable cache in for Trakt HTTP requests")
@click.pass_context
-def cli(ctx, version: bool):
+def cli(ctx, version: bool, no_cache: bool):
"""
Plex-Trakt-Sync is a two-way-sync between trakt.tv and Plex Media Server
"""
@@ -49,6 +50,10 @@ def cli(ctx, version: bool):
print(f"PlexTraktSync {version()}")
return
+ factory.run_config.update(
+ cache=not no_cache,
+ )
+
if not ctx.invoked_subcommand:
logger = factory.logger
logger.warning('plextraktsync without command is deprecated. Executing "plextraktsync sync"')
