From 0fa8fe114403befb9b28968a935aec39e02b3d0e Mon Sep 17 00:00:00 2001 From: croneter Date: Mon, 5 Nov 2018 18:18:46 +0100 Subject: [PATCH] Fix AttributeError on PKC DB reset --- resources/lib/utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index d4adb497..3f621f8c 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -518,14 +518,14 @@ def wipe_database(): delete_nodes() from . import kodidb_functions kodidb_functions.wipe_dbs() - from .plex_db import PlexDB + from . import plex_db # First get the paths to all synced playlists playlist_paths = [] - with PlexDB() as plex_db: - plex_db.cursor.execute('SELECT kodi_path FROM playlists') - for entry in plex_db.cursor: + with plex_db.PlexDB() as plexdb: + plexdb.cursor.execute('SELECT kodi_path FROM playlists') + for entry in plexdb.cursor: playlist_paths.append(entry[0]) - PlexDB.wipe() + plex_db.wipe() # Delete all synced playlists for path in playlist_paths: try: