From dcff85e20338150bd8fe3b8f744523beff4c33c3 Mon Sep 17 00:00:00 2001 From: croneter Date: Wed, 30 Jan 2019 10:58:20 +0100 Subject: [PATCH] Fix TV sections not being deleted e.g. after user switch --- resources/lib/library_sync/sections.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/lib/library_sync/sections.py b/resources/lib/library_sync/sections.py index 9b5eca66..8c03178a 100644 --- a/resources/lib/library_sync/sections.py +++ b/resources/lib/library_sync/sections.py @@ -215,16 +215,16 @@ def delete_sections(old_sections): LOG.info("Removing entire Plex library sections: %s", old_sections) with kodi_db.KodiVideoDB(texture_db=True) as kodidb: for section in old_sections: - if section[2] == v.KODI_TYPE_PHOTO: + if section[2] == v.PLEX_TYPE_PHOTO: # not synced plexdb.remove_section(section[0]) continue - elif section[2] == v.KODI_TYPE_MOVIE: + elif section[2] == v.PLEX_TYPE_MOVIE: video_library_update = True context = itemtypes.Movie(None, plexdb=plexdb, kodidb=kodidb) - elif section[2] == v.KODI_TYPE_SHOW: + elif section[2] == v.PLEX_TYPE_SHOW: video_library_update = True context = itemtypes.Show(None, plexdb=plexdb, @@ -238,7 +238,7 @@ def delete_sections(old_sections): with kodi_db.KodiMusicDB(texture_db=True) as kodidb: for section in old_sections: - if section[2] == v.KODI_TYPE_ARTIST: + if section[2] == v.PLEX_TYPE_ARTIST: music_library_update = True context = itemtypes.Artist(None, plexdb=plexdb,