mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
on all emby DB connection create check the emby tables
This commit is contained in:
parent
33cb101930
commit
ce46fb7015
2 changed files with 10 additions and 16 deletions
|
@ -139,18 +139,16 @@ def verify_emby_database(cursor):
|
|||
# Create the tables for the emby database
|
||||
# emby, view, version
|
||||
|
||||
if window('emby_db_checked') != "true":
|
||||
log.info("Verifying emby DB")
|
||||
cursor.execute(
|
||||
"""CREATE TABLE IF NOT EXISTS emby(
|
||||
emby_id TEXT UNIQUE, media_folder TEXT, emby_type TEXT, media_type TEXT,
|
||||
kodi_id INTEGER, kodi_fileid INTEGER, kodi_pathid INTEGER, parent_id INTEGER,
|
||||
checksum INTEGER)""")
|
||||
cursor.execute(
|
||||
"""CREATE TABLE IF NOT EXISTS view(
|
||||
view_id TEXT UNIQUE, view_name TEXT, media_type TEXT, kodi_tagid INTEGER)""")
|
||||
cursor.execute("CREATE TABLE IF NOT EXISTS version(idVersion TEXT)")
|
||||
window('emby_db_checked', value="true")
|
||||
log.info("Verifying emby DB")
|
||||
cursor.execute(
|
||||
"""CREATE TABLE IF NOT EXISTS emby(
|
||||
emby_id TEXT UNIQUE, media_folder TEXT, emby_type TEXT, media_type TEXT,
|
||||
kodi_id INTEGER, kodi_fileid INTEGER, kodi_pathid INTEGER, parent_id INTEGER,
|
||||
checksum INTEGER)""")
|
||||
cursor.execute(
|
||||
"""CREATE TABLE IF NOT EXISTS view(
|
||||
view_id TEXT UNIQUE, view_name TEXT, media_type TEXT, kodi_tagid INTEGER)""")
|
||||
cursor.execute("CREATE TABLE IF NOT EXISTS version(idVersion TEXT)")
|
||||
|
||||
def db_reset():
|
||||
|
||||
|
|
|
@ -86,10 +86,6 @@ class Service(object):
|
|||
|
||||
def service_entry_point(self):
|
||||
|
||||
# reset the internal emby tables check status
|
||||
# we need to check at least once per run or on switching profiles
|
||||
window('emby_db_checked', value="false")
|
||||
|
||||
# Important: Threads depending on abortRequest will not trigger
|
||||
# if profile switch happens more than once.
|
||||
self.monitor = kodimonitor.KodiMonitor()
|
||||
|
|
Loading…
Reference in a new issue