Fix UnboundLocalError when certain Plex sections are deleted or un-synced

This commit is contained in:
croneter 2020-07-29 17:42:04 +02:00
parent 096046347b
commit 61e4056a13

View file

@ -526,6 +526,9 @@ def _delete_kodi_db_items(section):
types = ((v.PLEX_TYPE_ARTIST, itemtypes.Artist), types = ((v.PLEX_TYPE_ARTIST, itemtypes.Artist),
(v.PLEX_TYPE_ALBUM, itemtypes.Album), (v.PLEX_TYPE_ALBUM, itemtypes.Album),
(v.PLEX_TYPE_SONG, itemtypes.Song)) (v.PLEX_TYPE_SONG, itemtypes.Song))
else:
types = ()
LOG.debug('Skipping deletion of DB elements for section %s', section)
for plex_type, context in types: for plex_type, context in types:
while True: while True:
with PlexDB() as plexdb: with PlexDB() as plexdb: