Fix AttributeError on PKC DB reset
This commit is contained in:
parent
e4c9a7a259
commit
0fa8fe1144
1 changed files with 5 additions and 5 deletions
|
@ -518,14 +518,14 @@ def wipe_database():
|
||||||
delete_nodes()
|
delete_nodes()
|
||||||
from . import kodidb_functions
|
from . import kodidb_functions
|
||||||
kodidb_functions.wipe_dbs()
|
kodidb_functions.wipe_dbs()
|
||||||
from .plex_db import PlexDB
|
from . import plex_db
|
||||||
# First get the paths to all synced playlists
|
# First get the paths to all synced playlists
|
||||||
playlist_paths = []
|
playlist_paths = []
|
||||||
with PlexDB() as plex_db:
|
with plex_db.PlexDB() as plexdb:
|
||||||
plex_db.cursor.execute('SELECT kodi_path FROM playlists')
|
plexdb.cursor.execute('SELECT kodi_path FROM playlists')
|
||||||
for entry in plex_db.cursor:
|
for entry in plexdb.cursor:
|
||||||
playlist_paths.append(entry[0])
|
playlist_paths.append(entry[0])
|
||||||
PlexDB.wipe()
|
plex_db.wipe()
|
||||||
# Delete all synced playlists
|
# Delete all synced playlists
|
||||||
for path in playlist_paths:
|
for path in playlist_paths:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue