mirror of
https://github.com/ManiMatter/decluttarr.git
synced 2026-04-20 15:55:40 +02:00
@@ -43,7 +43,7 @@ async def getDownloadedSize(settings_dict, queueItem, download_sizes_tracker, NA
|
|||||||
try:
|
try:
|
||||||
# Determines the speed of download
|
# Determines the speed of download
|
||||||
# Since Sonarr/Radarr do not update the downlodedSize on realtime, if possible, fetch it directly from qBit
|
# Since Sonarr/Radarr do not update the downlodedSize on realtime, if possible, fetch it directly from qBit
|
||||||
if settings_dict['QBITTORRENT_URL']:
|
if settings_dict['QBITTORRENT_URL'] and queueItem['downloadClient'] == 'qBittorrent':
|
||||||
qbitInfo = await rest_get(settings_dict['QBITTORRENT_URL']+'/torrents/info',params={'hashes': queueItem['downloadId']}, cookies=settings_dict['QBIT_COOKIE'] )
|
qbitInfo = await rest_get(settings_dict['QBITTORRENT_URL']+'/torrents/info',params={'hashes': queueItem['downloadId']}, cookies=settings_dict['QBIT_COOKIE'] )
|
||||||
downloadedSize = qbitInfo[0]['completed']
|
downloadedSize = qbitInfo[0]['completed']
|
||||||
else:
|
else:
|
||||||
@@ -62,4 +62,4 @@ async def getDownloadedSize(settings_dict, queueItem, download_sizes_tracker, NA
|
|||||||
return downloadedSize, previousSize, increment, speed
|
return downloadedSize, previousSize, increment, speed
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
errorDetails(NAME, error)
|
errorDetails(NAME, error)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user