Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ManiMatter committed Apr 10, 2024
1 parent 1676df3 commit bb8a1aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ async def main(settingsDict):
if settingsDict['IGNORE_PRIVATE_TRACKERS']:
privateDowloadItems = await rest_get(settingsDict['QBITTORRENT_URL']+'/torrents/info',params={}, cookies=settingsDict['QBIT_COOKIE'] )
privateDowloadIDs = [str.upper(item['hash']) for item in privateDowloadItems if item.get('is_private', False)]

logger.debug('main/protectedDownloadIDs: %s', str(protectedDownloadIDs))
logger.debug('main/privateDowloadIDs: %s', str(privateDowloadIDs))

# Run script for each instance
for instance in settingsDict['INSTANCES']:
Expand Down
3 changes: 0 additions & 3 deletions src/utils/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def protectedDownloadCheck(settingsDict, affectedItems, failType, protectedDownl
async def execute_checks(settingsDict, affectedItems, failType, BASE_URL, API_KEY, NAME, deleted_downloads, defective_tracker, privateDowloadIDs, protectedDownloadIDs, addToBlocklist, doPrivateTrackerCheck, doProtectedDownloadCheck, doPermittedAttemptsCheck, extraParameters = []):
# Goes over the affected items and performs the checks that are parametrized
try:
logger.debug('execute_checks/extraParameters (failType: %s): %s', failType, str(extraParameters))
# De-duplicates the affected items (one downloadid may be shared by multiple affected items)
downloadIDs = []
for affectedItem in reversed(affectedItems):
Expand All @@ -67,10 +66,8 @@ async def execute_checks(settingsDict, affectedItems, failType, BASE_URL, API_KE
else:
affectedItems.remove(affectedItem)
# Skips protected items
logger.debug('execute_checks/protectedDownloadIDs (failType: %s): %s', failType, str(protectedDownloadIDs))
if doPrivateTrackerCheck:
affectedItems = privateTrackerCheck(settingsDict, affectedItems, failType, privateDowloadIDs)
logger.debug('execute_checks/privateDowloadIDs (failType: %s): %s', failType, str(privateDowloadIDs))
if doProtectedDownloadCheck:
affectedItems = protectedDownloadCheck(settingsDict, affectedItems, failType, protectedDownloadIDs)
# Checks if failing more often than permitted
Expand Down

0 comments on commit bb8a1aa

Please sign in to comment.