Qbittorrent folder name

This commit is contained in:
Ade
2017-04-05 21:38:59 +12:00
parent 2832166842
commit 437d33e7a8
2 changed files with 5 additions and 5 deletions

View File

@@ -56,9 +56,9 @@ def checkFolder():
# Qbittorrent - get folder from torrent hash
if album['TorrentHash']:
if headphones.CONFIG.TORRENT_DOWNLOADER == 4:
folder_name, single = qbittorrent.getFolder(album['TorrentHash'])
if not folder_name:
logger.debug("Could not get folder name from torrent hash for " + album['Title'])
torrent_folder_name, single = qbittorrent.getFolder(album['TorrentHash'])
if torrent_folder_name:
folder_name = torrent_folder_name
if folder_name:
album_path = os.path.join(download_dir, folder_name).encode(

View File

@@ -204,13 +204,13 @@ def getName(hash):
qbclient = qbittorrentclient()
tries = 1
while tries <= 5:
while tries <= 6:
time.sleep(10)
status, torrentlist = qbclient._get_list()
for torrent in torrentlist:
if torrent['hash'].lower() == hash.lower():
return torrent['name']
tries += 1
time.sleep(1)
return None