From c979940706c760f5e1f426f55ab70e3888993d21 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 13 Jan 2019 12:51:38 +0530 Subject: [PATCH] don't pull changes if download rate is 0 --- oml/nodes.py | 2 ++ oml/state.py | 1 + 2 files changed, 3 insertions(+) diff --git a/oml/nodes.py b/oml/nodes.py index d16b402..ea89cf7 100644 --- a/oml/nodes.py +++ b/oml/nodes.py @@ -542,6 +542,8 @@ class Nodes(Thread): self.queue('pull') def _pull(self): + if not state.sync_enabled or settings.preferences.get('downloadRate') == 0: + return if state.activity and state.activity.get('activity') == 'import': return self._pulling = True diff --git a/oml/state.py b/oml/state.py index 7f63690..4768e7b 100644 --- a/oml/state.py +++ b/oml/state.py @@ -8,6 +8,7 @@ node = False online = False tasks = False downloads = False +sync_enabled = True tor = False update = False shutdown = False