Skip to content

Commit

Permalink
Merge pull request #126 from ManiMatter/dev
Browse files Browse the repository at this point in the history
Bugfix - min version check #patch
  • Loading branch information
ManiMatter authored Jul 11, 2024
2 parents 7c2cc97 + fb1b74e commit c9ad596
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utils/loadScripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async def instanceChecks(settingsDict):
if version.parse(current_version) < version.parse(settingsDict[instance + '_MIN_VERSION']):
error_occured = True
logger.error('!! %s Error: !!', settingsDict[instance + '_NAME'])
logger.error('Please update %s to at least version %s. Current version: %s', settingsDict[instance + 'MIN_VERSION'],current_version)
logger.error('Please update %s to at least version %s. Current version: %s', settingsDict[instance + '_MIN_VERSION'],current_version)
if not error_occured:
logger.info('OK | %s', settingsDict[instance + '_NAME'])
logger.debug('Current version of %s: %s', instance, current_version)
Expand Down
11 changes: 10 additions & 1 deletion src/utils/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,13 @@ def formattedQueueInfo(queue):
except Exception as error:
errorDetails('formattedQueueInfo', error)
logger.debug('formattedQueueInfo/queue for debug: %s', str(queue))
return 'error'
return 'error'


async def qBitOffline(settingsDict, failType, NAME):
if settingsDict['QBITTORRENT_URL']:
qBitConnectionStatus = (await rest_get(settingsDict['QBITTORRENT_URL']+'/sync/maindata', cookies=settingsDict['QBIT_COOKIE']))['server_state']['connection_status']
if qBitConnectionStatus == 'disconnected':
logger.warning('>>> qBittorrent is disconnected. Skipping %s queue cleaning failed on %s.',failType, NAME)
return True
return False

0 comments on commit c9ad596

Please sign in to comment.