diff --git a/headphones/searcher.py b/headphones/searcher.py index ecc92acb..c89720b3 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -705,8 +705,8 @@ def send_to_downloader(data, bestqual, album): else: file_or_url = bestqual[2] - folder_name = utorrent.addTorrent(bestqual[2],bestqual[0]) - + folder_name = utorrent.addTorrent(file_or_url,bestqual[0]) + if folder_name: logger.info('Torrent folder name: %s' % folder_name) else: diff --git a/headphones/utorrent.py b/headphones/utorrent.py index e8fb4809..ee14849b 100644 --- a/headphones/utorrent.py +++ b/headphones/utorrent.py @@ -84,7 +84,7 @@ def addTorrent(link, title): if torrent[2] == title and torrent[4] > 1: folder = os.path.basename(torrent[26]) tor_hash = torrent[0] - params = {'action':'setprops', 'hash':tor_hash,'s':'label', 'v':label} + params = {'action':'setprops', 'hash':tor_hash,'s':'label', 'v':label, token':token} response = request.request_json(host, params=params, auth=auth, cookies=cookies) break else: