Merge pull request #1206 from croneter/fixUnboundLocalError

Fix UnboundLocalError when certain Plex sections are deleted or being un-synched
This commit is contained in:
croneter 2020-09-19 20:43:51 +02:00 committed by GitHub
commit 12b863a5ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -526,6 +526,9 @@ def _delete_kodi_db_items(section):
types = ((v.PLEX_TYPE_ARTIST, itemtypes.Artist),
(v.PLEX_TYPE_ALBUM, itemtypes.Album),
(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:
while True:
with PlexDB() as plexdb: