From aa2b1e5e157f7fedfe08bf6d80674692efae680b Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 27 Jan 2019 08:44:05 +0100 Subject: [PATCH] Always open a connection to the Kodi texture DB --- resources/lib/itemtypes/common.py | 12 ++++-------- resources/lib/itemtypes/music.py | 10 +++------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/resources/lib/itemtypes/common.py b/resources/lib/itemtypes/common.py index 4074430b..c8c47877 100644 --- a/resources/lib/itemtypes/common.py +++ b/resources/lib/itemtypes/common.py @@ -6,7 +6,7 @@ from ntpath import dirname from ..plex_db import PlexDB, PLEXDB_LOCK from ..kodi_db import KodiVideoDB, KODIDB_LOCK -from .. import utils, timing, app +from .. import utils, timing LOG = getLogger('PLEX.itemtypes.common') @@ -61,14 +61,10 @@ class ItemBase(object): self.plexcursor = self.plexconn.cursor() self.kodiconn = utils.kodi_sql('video') self.kodicursor = self.kodiconn.cursor() - if app.SYNC.artwork: - self.artconn = utils.kodi_sql('texture') - self.artcursor = self.artconn.cursor() - else: - self.artconn = None - self.artcursor = None + self.artconn = utils.kodi_sql('texture') + self.artcursor = self.artconn.cursor() self.plexdb = PlexDB(plexconn=self.plexconn, lock=False) - self.kodidb = KodiVideoDB(texture_db=app.SYNC.artwork, + self.kodidb = KodiVideoDB(texture_db=True, kodiconn=self.kodiconn, artconn=self.artconn, lock=False) diff --git a/resources/lib/itemtypes/music.py b/resources/lib/itemtypes/music.py index b51da1cb..a182f7ef 100644 --- a/resources/lib/itemtypes/music.py +++ b/resources/lib/itemtypes/music.py @@ -24,14 +24,10 @@ class MusicMixin(object): self.plexcursor = self.plexconn.cursor() self.kodiconn = utils.kodi_sql('music') self.kodicursor = self.kodiconn.cursor() - if app.SYNC.artwork: - self.artconn = utils.kodi_sql('texture') - self.artcursor = self.artconn.cursor() - else: - self.artconn = None - self.artcursor = None + self.artconn = utils.kodi_sql('texture') + self.artcursor = self.artconn.cursor() self.plexdb = PlexDB(plexconn=self.plexconn, lock=False) - self.kodidb = KodiMusicDB(texture_db=app.SYNC.artwork, + self.kodidb = KodiMusicDB(texture_db=True, kodiconn=self.kodiconn, artconn=self.artconn, lock=False)