From f8c11faada040c6824f5afdab1121aa5ad5a1a1f Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 19 Apr 2021 13:17:34 +0200 Subject: [PATCH] don't start 2t stuff if there's no backend avail --- copyparty/up2k.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/copyparty/up2k.py b/copyparty/up2k.py index 705a488a..210a3b4c 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -101,17 +101,18 @@ class Up2k(object): thr.daemon = True thr.start() - thr = threading.Thread(target=self._tagger) - thr.daemon = True - thr.start() - thr = threading.Thread(target=self._hasher) thr.daemon = True thr.start() - thr = threading.Thread(target=self._run_all_mtp) - thr.daemon = True - thr.start() + if self.mtag: + thr = threading.Thread(target=self._tagger) + thr.daemon = True + thr.start() + + thr = threading.Thread(target=self._run_all_mtp) + thr.daemon = True + thr.start() def log(self, msg, c=0): self.log_func("up2k", msg + "\033[K", c)