From 41424e66abe5bda58fce8e3c44e6819f3246c8aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morav=C4=8D=C3=ADk=2C=20Marian?= Date: Sun, 29 Dec 2019 22:32:51 +0100 Subject: [PATCH] add no-tasks argument --- bazarr/get_args.py | 2 ++ bazarr/scheduler.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bazarr/get_args.py b/bazarr/get_args.py index 0bedd4f92..0c1512c76 100644 --- a/bazarr/get_args.py +++ b/bazarr/get_args.py @@ -24,6 +24,8 @@ def get_args(): help="Enable file based updater (default: False)") parser.add_argument('--dev', default=False, type=bool, const=True, metavar="BOOL", nargs="?", help="Enable developer mode (default: False)") + parser.add_argument('--no-tasks', default=False, type=bool, const=True, metavar="BOOL", nargs="?", + help="Disable all tasks (default: False)") return parser.parse_args() diff --git a/bazarr/scheduler.py b/bazarr/scheduler.py index eba04a828..9d4667c48 100644 --- a/bazarr/scheduler.py +++ b/bazarr/scheduler.py @@ -142,6 +142,8 @@ radarr_full_update() schedule_wanted_search() schedule_upgrade_subs() scheduler.start() +if args.no_tasks: + scheduler.pause() def add_job(job, name=None, max_instances=1, coalesce=True, args=None):