mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Delete uploaded file if invalid database
This commit is contained in:
parent
39e1caec0f
commit
42c6340c06
1 changed files with 6 additions and 0 deletions
|
@ -3797,6 +3797,8 @@ class WebInterface(object):
|
||||||
return {'result': 'success',
|
return {'result': 'success',
|
||||||
'message': 'Import has started. Check the logs to monitor any problems.'}
|
'message': 'Import has started. Check the logs to monitor any problems.'}
|
||||||
else:
|
else:
|
||||||
|
if database_file:
|
||||||
|
helpers.delete_file(database_path)
|
||||||
return {'result': 'error', 'message': db_check_msg}
|
return {'result': 'error', 'message': db_check_msg}
|
||||||
|
|
||||||
elif app.lower() == 'plexwatch':
|
elif app.lower() == 'plexwatch':
|
||||||
|
@ -3810,6 +3812,8 @@ class WebInterface(object):
|
||||||
return {'result': 'success',
|
return {'result': 'success',
|
||||||
'message': 'Import has started. Check the logs to monitor any problems.'}
|
'message': 'Import has started. Check the logs to monitor any problems.'}
|
||||||
else:
|
else:
|
||||||
|
if database_file:
|
||||||
|
helpers.delete_file(database_path)
|
||||||
return {'result': 'error', 'message': db_check_msg}
|
return {'result': 'error', 'message': db_check_msg}
|
||||||
|
|
||||||
elif app.lower() == 'plexivity':
|
elif app.lower() == 'plexivity':
|
||||||
|
@ -3823,6 +3827,8 @@ class WebInterface(object):
|
||||||
return {'result': 'success',
|
return {'result': 'success',
|
||||||
'message': 'Import has started. Check the logs to monitor any problems.'}
|
'message': 'Import has started. Check the logs to monitor any problems.'}
|
||||||
else:
|
else:
|
||||||
|
if database_file:
|
||||||
|
helpers.delete_file(database_path)
|
||||||
return {'result': 'error', 'message': db_check_msg}
|
return {'result': 'error', 'message': db_check_msg}
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue