|
|
@ -4,7 +4,6 @@ import logging
|
|
|
|
import json
|
|
|
|
import json
|
|
|
|
import requests
|
|
|
|
import requests
|
|
|
|
import tarfile
|
|
|
|
import tarfile
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from get_args import args
|
|
|
|
from get_args import args
|
|
|
|
from config import settings
|
|
|
|
from config import settings
|
|
|
@ -295,14 +294,10 @@ def request_json(url, **kwargs):
|
|
|
|
def updated(restart=True):
|
|
|
|
def updated(restart=True):
|
|
|
|
if settings.general.getboolean('update_restart') and restart:
|
|
|
|
if settings.general.getboolean('update_restart') and restart:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
database.close()
|
|
|
|
from main import restart
|
|
|
|
restart_file = open(os.path.join(args.config_dir, "bazarr.restart"), "w")
|
|
|
|
restart()
|
|
|
|
logging.info('Bazarr is being restarted...')
|
|
|
|
except:
|
|
|
|
restart_file.write('')
|
|
|
|
logging.info('BAZARR Restart failed, please restart Bazarr manualy')
|
|
|
|
restart_file.close()
|
|
|
|
|
|
|
|
sys.exit(0)
|
|
|
|
|
|
|
|
except Exception as e:
|
|
|
|
|
|
|
|
logging.info('BAZARR Restart failed, please restart Bazarr manually')
|
|
|
|
|
|
|
|
updated(restart=False)
|
|
|
|
updated(restart=False)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
database.execute("UPDATE system SET updated='1'")
|
|
|
|
database.execute("UPDATE system SET updated='1'")
|
|
|
|