merge upstream master

This commit is contained in:
TrueTechy 2019-10-06 15:14:43 +01:00
parent 6e06a6f5f7
commit b217352681
16 changed files with 0 additions and 166 deletions

View file

@ -146,18 +146,3 @@ class JellyfinDatabase():
def remove_media_by_parent_id(self, *args):
self.cursor.execute(QU.delete_media_by_parent_id, args)
def get_version(self, version=None):
if version is not None:
self.cursor.execute(QU.delete_version)
self.cursor.execute(QU.add_version, (version,))
else:
try:
self.cursor.execute(QU.get_version)
version = self.cursor.fetchone()[0]
except Exception as error:
LOG.exception(error)
return version

View file

@ -88,7 +88,6 @@ SELECT idVersion
FROM version
"""
add_reference = """
INSERT OR REPLACE INTO jellyfin(jellyfin_id, kodi_id, kodi_fileid, kodi_pathid, jellyfin_type,
media_type, parent_id, checksum, media_folder, jellyfin_parent_id)
@ -113,7 +112,6 @@ INSERT OR REPLACE INTO version(idVersion)
VALUES (?)
"""
update_reference = """
UPDATE jellyfin
SET checksum = ?

View file

@ -68,7 +68,6 @@ class Service(xbmc.Monitor):
LOG.info("Using dynamic paths: %s", settings('useDirectPaths') == "0")
LOG.info("Log Level: %s", self.settings['log_level'])
self.check_version()
verify_kodi_defaults()
try:
@ -147,29 +146,6 @@ class Service(xbmc.Monitor):
self.library_thread.stop_client()
self.library_thread = None
def check_version(self):
''' Check the database version to ensure we do not need to do a reset.
'''
with Database('jellyfin') as jellyfindb:
version = jellyfin_db.JellyfinDatabase(jellyfindb.cursor).get_version()
LOG.info("---[ db/%s ]", version)
if version and compare_version(version, "3.1.0") < 0:
resp = dialog("yesno", heading=_('addon_name'), line1=_(33022))
if not resp:
LOG.warning("Database version is out of date! USER IGNORED!")
dialog("ok", heading=_('addon_name'), line1=_(33023))
raise Exception("User backed out of a required database reset")
else:
reset()
raise Exception("Completed database reset")
def onNotification(self, sender, method, data):
''' All notifications are sent via NotifyAll built-in or Kodi.