Skip to content

Commit

Permalink
Merge pull request #38 from TheNetworkGuy/dev
Browse files Browse the repository at this point in the history
Update remove_slow.py
  • Loading branch information
ManiMatter authored Feb 20, 2024
2 parents 7eb4d0b + 34109bf commit 56dd1d1
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 56dd1d1

Please sign in to comment.