mirror of https://github.com/morpheus65535/bazarr
add restart after update
This commit is contained in:
parent
a26f64efc5
commit
65729064f4
|
@ -11,7 +11,7 @@ import sqlite3
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from get_args import args
|
from get_args import args
|
||||||
from config import settings
|
from config import settings, bazarr_url
|
||||||
|
|
||||||
|
|
||||||
def check_releases():
|
def check_releases():
|
||||||
|
@ -375,3 +375,7 @@ def updated():
|
||||||
c.execute("UPDATE system SET updated = 1")
|
c.execute("UPDATE system SET updated = 1")
|
||||||
conn.commit()
|
conn.commit()
|
||||||
c.close()
|
c.close()
|
||||||
|
try:
|
||||||
|
requests.get(bazarr_url + 'restart')
|
||||||
|
except requests.ConnectionError:
|
||||||
|
logging.info('BAZARR: Restart failed, please restart Bazarr manualy')
|
||||||
|
|
|
@ -104,6 +104,7 @@ settings = simpleconfigparser(defaults=defaults)
|
||||||
settings.read(os.path.join(args.config_dir, 'config', 'config.ini'))
|
settings.read(os.path.join(args.config_dir, 'config', 'config.ini'))
|
||||||
|
|
||||||
base_url = settings.general.base_url
|
base_url = settings.general.base_url
|
||||||
|
bazarr_url = 'http://localhost:' + (args.port if args.port else settings.general.port) + base_url
|
||||||
|
|
||||||
# sonarr url
|
# sonarr url
|
||||||
if settings.sonarr.getboolean('ssl'):
|
if settings.sonarr.getboolean('ssl'):
|
||||||
|
|
Loading…
Reference in New Issue