mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-26 01:27:07 +00:00
Fixed other issues with peewee
This commit is contained in:
parent
d34add9fa4
commit
75c003ab67
2 changed files with 6 additions and 3 deletions
|
@ -246,6 +246,9 @@ database.create_tables([System,
|
||||||
TableShows,
|
TableShows,
|
||||||
TableShowsRootfolder])
|
TableShowsRootfolder])
|
||||||
|
|
||||||
|
# add the system table single row if it's not existing
|
||||||
|
if not System.select().count():
|
||||||
|
System.insert({System.configured: '0', System.updated: '0'}).execute()
|
||||||
|
|
||||||
class SqliteDictPathMapper:
|
class SqliteDictPathMapper:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
@ -100,14 +100,14 @@ def catch_all(path):
|
||||||
auth = False
|
auth = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
updated = System.select().where(updated='1')
|
updated = System.get().updated
|
||||||
except:
|
except:
|
||||||
updated = False
|
updated = '0'
|
||||||
|
|
||||||
inject = dict()
|
inject = dict()
|
||||||
inject["baseUrl"] = base_url
|
inject["baseUrl"] = base_url
|
||||||
inject["canUpdate"] = not args.no_update
|
inject["canUpdate"] = not args.no_update
|
||||||
inject["hasUpdate"] = len(updated)
|
inject["hasUpdate"] = updated != '0'
|
||||||
|
|
||||||
if auth:
|
if auth:
|
||||||
inject["apiKey"] = settings.auth.apikey
|
inject["apiKey"] = settings.auth.apikey
|
||||||
|
|
Loading…
Reference in a new issue