From ccc2028690c217322d9711a171325e026f5adf75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20K=C3=A5berg?= Date: Tue, 26 Nov 2013 15:51:12 +0100 Subject: [PATCH] remove directory option in utorrent doesn't behave as expected on windows --- couchpotato/core/downloaders/utorrent/__init__.py | 5 ----- couchpotato/core/downloaders/utorrent/main.py | 10 ++-------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/couchpotato/core/downloaders/utorrent/__init__.py b/couchpotato/core/downloaders/utorrent/__init__.py index 0c4c323c..d45e2e6c 100644 --- a/couchpotato/core/downloaders/utorrent/__init__.py +++ b/couchpotato/core/downloaders/utorrent/__init__.py @@ -36,11 +36,6 @@ config = [{ 'name': 'label', 'description': 'Label to add torrent as.', }, - { - 'name': 'directory', - 'type': 'directory', - 'description': 'Download to this directory. Keep empty for default uTorrent download directory.', - }, { 'name': 'remove_complete', 'label': 'Remove torrent', diff --git a/couchpotato/core/downloaders/utorrent/main.py b/couchpotato/core/downloaders/utorrent/main.py index e05d1043..9ae5fcb3 100644 --- a/couchpotato/core/downloaders/utorrent/main.py +++ b/couchpotato/core/downloaders/utorrent/main.py @@ -92,12 +92,6 @@ class uTorrent(Downloader): if len(torrent_hash) == 32: torrent_hash = b16encode(b32decode(torrent_hash)) - # Set download directory - if self.conf('directory'): - directory = self.conf('directory') - else: - directory = False - # Send request to uTorrent if data.get('protocol') == 'torrent_magnet': self.utorrent_api.add_torrent_uri(torrent_filename, data.get('url'), directory) @@ -256,13 +250,13 @@ class uTorrentAPI(object): def add_torrent_uri(self, filename, torrent, add_folder = False): action = "action=add-url&s=%s" % urllib.quote(torrent) if add_folder: - action += "&path=%s" % urllib.quote(add_folder) + action += "&path=%s" % urllib.quote(filename) return self._request(action) def add_torrent_file(self, filename, filedata, add_folder = False): action = "action=add-file" if add_folder: - action += "&path=%s" % urllib.quote(add_folder) + action += "&path=%s" % urllib.quote(filename) return self._request(action, {"torrent_file": (ss(filename), filedata)}) def set_torrent(self, hash, params):