diff --git a/couchpotato/core/downloaders/deluge/main.py b/couchpotato/core/downloaders/deluge/main.py index a990b17..e8e0b45 100644 --- a/couchpotato/core/downloaders/deluge/main.py +++ b/couchpotato/core/downloaders/deluge/main.py @@ -5,14 +5,13 @@ from couchpotato.core.helpers.encoding import isInt from couchpotato.core.logger import CPLog from couchpotato.environment import Env from datetime import timedelta - from synchronousdeluge import DelugeClient - import os.path import traceback log = CPLog(__name__) + class Deluge(Downloader): protocol = ['torrent', 'torrent_magnet'] @@ -238,4 +237,3 @@ class DelugeRPC(object): def disconnect(self): self.client.disconnect() - diff --git a/couchpotato/core/downloaders/deluge/synchronousdeluge/__init__.py b/libs/synchronousdeluge/__init__.py similarity index 81% rename from couchpotato/core/downloaders/deluge/synchronousdeluge/__init__.py rename to libs/synchronousdeluge/__init__.py index a6fbcdd..208e45c 100644 --- a/couchpotato/core/downloaders/deluge/synchronousdeluge/__init__.py +++ b/libs/synchronousdeluge/__init__.py @@ -19,6 +19,6 @@ __title__ = "synchronous-deluge" __version__ = "0.1" __author__ = "Christian Dale" -from .client import DelugeClient -from .exceptions import DelugeRPCError +from .synchronousdeluge.client import DelugeClient +from .synchronousdeluge.exceptions import DelugeRPCError diff --git a/couchpotato/core/downloaders/deluge/synchronousdeluge/client.py b/libs/synchronousdeluge/client.py similarity index 95% rename from couchpotato/core/downloaders/deluge/synchronousdeluge/client.py rename to libs/synchronousdeluge/client.py index 363bd85..1b63b0b 100644 --- a/couchpotato/core/downloaders/deluge/synchronousdeluge/client.py +++ b/libs/synchronousdeluge/client.py @@ -3,9 +3,9 @@ import os from collections import defaultdict from itertools import imap -from .exceptions import DelugeRPCError -from .protocol import DelugeRPCRequest, DelugeRPCResponse -from .transfer import DelugeTransfer +from .synchronousdeluge.exceptions import DelugeRPCError +from .synchronousdeluge.protocol import DelugeRPCRequest, DelugeRPCResponse +from .synchronousdeluge.transfer import DelugeTransfer __all__ = ["DelugeClient"] diff --git a/couchpotato/core/downloaders/deluge/synchronousdeluge/exceptions.py b/libs/synchronousdeluge/exceptions.py similarity index 100% rename from couchpotato/core/downloaders/deluge/synchronousdeluge/exceptions.py rename to libs/synchronousdeluge/exceptions.py diff --git a/couchpotato/core/downloaders/deluge/synchronousdeluge/protocol.py b/libs/synchronousdeluge/protocol.py similarity index 100% rename from couchpotato/core/downloaders/deluge/synchronousdeluge/protocol.py rename to libs/synchronousdeluge/protocol.py diff --git a/couchpotato/core/downloaders/deluge/synchronousdeluge/rencode.py b/libs/synchronousdeluge/rencode.py similarity index 100% rename from couchpotato/core/downloaders/deluge/synchronousdeluge/rencode.py rename to libs/synchronousdeluge/rencode.py diff --git a/couchpotato/core/downloaders/deluge/synchronousdeluge/transfer.py b/libs/synchronousdeluge/transfer.py similarity index 94% rename from couchpotato/core/downloaders/deluge/synchronousdeluge/transfer.py rename to libs/synchronousdeluge/transfer.py index 4f13ba5..29b1ebe 100644 --- a/couchpotato/core/downloaders/deluge/synchronousdeluge/transfer.py +++ b/libs/synchronousdeluge/transfer.py @@ -1,7 +1,10 @@ import zlib import struct -import socket, ssl -from . import rencode +import socket +import ssl + +from synchronousdeluge import rencode + __all__ = ["DelugeTransfer"]