Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix - min version check #patch #126

Merged
merged 4 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading