Deluge update to V2 (#1683) Fixes #1680

This commit is contained in:
Clinton Hall 2019-12-10 12:55:13 +13:00 committed by GitHub
commit aeb3e0fd6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 820 additions and 337 deletions

View file

@ -5,7 +5,7 @@ from __future__ import (
unicode_literals,
)
from synchronousdeluge.client import DelugeClient
from deluge_client.client import DelugeRPCClient
import core
from core import logger
@ -19,9 +19,9 @@ def configure_client():
password = core.DELUGE_PASSWORD
logger.debug('Connecting to {0}: http://{1}:{2}'.format(agent, host, port))
client = DelugeClient()
client = DelugeRPCClient(host, port, user, password)
try:
client.connect(host, port, user, password)
client.connect()
except Exception:
logger.error('Failed to connect to Deluge')
else: