mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-09 05:09:27 +01:00
Qbittorrent folder name
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user