diff --git a/clients/deluge.py b/clients/deluge.py index 1a03f884cb4588b343d7ed8b804bb3c5b6dfd8df..f39e319d7fffcc64efcbbaee4aaecb4d84e079ca 100644 --- a/clients/deluge.py +++ b/clients/deluge.py @@ -72,6 +72,8 @@ class DelugeClient(TorrentClient): 'params': params }).encode('utf-8') + self.send_log('Calling Deluge API with method {}'.format(method), 'debug') + req = self._add_common_headers(Request(self.url, data=data)) self.request_id += 1 diff --git a/clients/torrentclient.py b/clients/torrentclient.py index e6c42f87682871fd242e4e6e5d712db5bd155439..4a1d8713421d24ed5167606518975881910410b4 100644 --- a/clients/torrentclient.py +++ b/clients/torrentclient.py @@ -1,12 +1,6 @@ __author__ = 'barry' -import urllib.request -from urllib.request import Request, urlopen, URLError -from urllib.parse import urlsplit -from bs4 import BeautifulSoup -import json +from urllib.request import urlopen, URLError import sys -import re -import gzip # TODO Deal with slashes in client URL @@ -95,7 +89,12 @@ class TorrentClient: return res def _process_response(self, res): - # TODO May only be needed for deluge. Remove from parent if that's the case + """ + Perform response handling for the specific torrent client. Each line requires different processing/decoding of + the response + :param res: + :return: + """ raise NotImplementedError def _authenticate(self):