Skip to content

Commit

Permalink
Update remove_slow.py
Browse files Browse the repository at this point in the history
Added qBittorrent check
  • Loading branch information
TheNetworkGuy authored Feb 20, 2024
1 parent 7eb4d0b commit 34109bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/remove_slow.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async def getDownloadedSize(settings_dict, queueItem, download_sizes_tracker, NA
try:
# Determines the speed of download
# 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'] )
downloadedSize = qbitInfo[0]['completed']
else:
Expand All @@ -62,4 +62,4 @@ async def getDownloadedSize(settings_dict, queueItem, download_sizes_tracker, NA
return downloadedSize, previousSize, increment, speed
except Exception as error:
errorDetails(NAME, error)
return
return

0 comments on commit 34109bf

Please sign in to comment.