|
|
@ -1,8 +1,10 @@
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
import atexit
|
|
|
|
|
|
|
|
|
|
|
|
from get_args import args
|
|
|
|
from get_args import args
|
|
|
|
from peewee import *
|
|
|
|
from peewee import *
|
|
|
|
from playhouse.sqliteq import SqliteQueueDatabase
|
|
|
|
from playhouse.sqliteq import SqliteQueueDatabase
|
|
|
|
|
|
|
|
from playhouse.reflection import generate_models
|
|
|
|
|
|
|
|
|
|
|
|
from helper import path_replace, path_replace_movie, path_replace_reverse, path_replace_reverse_movie
|
|
|
|
from helper import path_replace, path_replace_movie, path_replace_reverse, path_replace_reverse_movie
|
|
|
|
|
|
|
|
|
|
|
@ -166,6 +168,11 @@ class TableSettingsNotifier(BaseModel):
|
|
|
|
table_name = 'table_settings_notifier'
|
|
|
|
table_name = 'table_settings_notifier'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@atexit.register
|
|
|
|
|
|
|
|
def _stop_worker_threads():
|
|
|
|
|
|
|
|
database.stop()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def database_init():
|
|
|
|
def database_init():
|
|
|
|
database.start()
|
|
|
|
database.start()
|
|
|
|
database.connect()
|
|
|
|
database.connect()
|
|
|
@ -183,8 +190,3 @@ def database_init():
|
|
|
|
System.configured: 0
|
|
|
|
System.configured: 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
).execute()
|
|
|
|
).execute()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def database_close():
|
|
|
|
|
|
|
|
if not database.is_closed():
|
|
|
|
|
|
|
|
database.close()
|
|
|
|
|
|
|
|