remove directory option in utorrent

doesn't behave as expected on windows
This commit is contained in:
Joel Kåberg
2013-11-26 15:51:12 +01:00
parent 81dbc1ca79
commit ccc2028690
2 changed files with 2 additions and 13 deletions

View File

@@ -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',

View File

@@ -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):