diff --git a/resources/lib/kodi_db/__init__.py b/resources/lib/kodi_db/__init__.py index 756ff79c..4778d422 100644 --- a/resources/lib/kodi_db/__init__.py +++ b/resources/lib/kodi_db/__init__.py @@ -29,7 +29,7 @@ def kodiid_from_filename(path, kodi_type=None, db_type=None): filename = path.rsplit('\\', 1)[1] path = path.rsplit('\\', 1)[0] + '\\' if kodi_type == v.KODI_TYPE_SONG or db_type == 'music': - with KodiMusicDB() as kodidb: + with KodiMusicDB(lock=False) as kodidb: try: kodi_id = kodidb.song_id_from_filename(filename, path) except TypeError: @@ -37,7 +37,7 @@ def kodiid_from_filename(path, kodi_type=None, db_type=None): else: kodi_type = v.KODI_TYPE_SONG else: - with KodiVideoDB() as kodidb: + with KodiVideoDB(lock=False) as kodidb: try: kodi_id, kodi_type = kodidb.video_id_from_filename(filename, path) diff --git a/resources/lib/playlist_func.py b/resources/lib/playlist_func.py index 1ce9f525..a76d6529 100644 --- a/resources/lib/playlist_func.py +++ b/resources/lib/playlist_func.py @@ -320,7 +320,7 @@ def playlist_item_from_kodi(kodi_item): item.kodi_id = kodi_item.get('id') item.kodi_type = kodi_item.get('type') if item.kodi_id: - with PlexDB() as plexdb: + with PlexDB(lock=False) as plexdb: db_item = plexdb.item_by_kodi_id(kodi_item['id'], kodi_item['type']) if db_item: item.plex_id = db_item['plex_id'] @@ -397,7 +397,7 @@ def playlist_item_from_plex(plex_id): """ item = Playlist_Item() item.plex_id = plex_id - with PlexDB() as plexdb: + with PlexDB(lock=False) as plexdb: db_item = plexdb.item_by_id(plex_id) if db_item: item.plex_type = db_item['plex_type'] @@ -429,7 +429,7 @@ def playlist_item_from_xml(xml_video_element, kodi_id=None, kodi_type=None): item.kodi_id = kodi_id item.kodi_type = kodi_type elif item.plex_id is not None and item.plex_type != v.PLEX_TYPE_CLIP: - with PlexDB() as plexdb: + with PlexDB(lock=False) as plexdb: db_element = plexdb.item_by_id(item.plex_id) if db_element: item.kodi_id = db_element['kodi_id']