From dfbb84caae02db65082422e30cd25d7ddf052016 Mon Sep 17 00:00:00 2001 From: mikke89 Date: Tue, 21 Jan 2014 01:12:34 +0100 Subject: [PATCH] Small fix deluge --- couchpotato/core/downloaders/deluge/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/downloaders/deluge/main.py b/couchpotato/core/downloaders/deluge/main.py index 4fe23aa..b94da29 100644 --- a/couchpotato/core/downloaders/deluge/main.py +++ b/couchpotato/core/downloaders/deluge/main.py @@ -21,20 +21,20 @@ class Deluge(Downloader): drpc = None testable = True - def connect(self): + def connect(self, reconnect = False): # Load host from config and split out port. host = cleanHost(self.conf('host'), protocol = False).split(':') if not isInt(host[1]): log.error('Config properties are not filled in correctly, port is missing.') return False - if not (self.drpc and self.drpc.test()): + if not self.drpc or reconnect: self.drpc = DelugeRPC(host[0], port = host[1], username = self.conf('username'), password = self.conf('password')) return self.drpc def test(self): - if self.connect() and self.drpc.test(): + if self.connect(True) and self.drpc.test(): return True return False