Merge pull request #38 from TheNetworkGuy/dev

Update remove_slow.py
This commit is contained in:
ManiMatter
2024-02-20 21:41:12 +01:00
committed by GitHub

View File

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