Fix TV sections not being deleted e.g. after user switch

This commit is contained in:
croneter 2019-01-30 10:58:20 +01:00
parent 1e499ebfe6
commit dcff85e203

View file

@ -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,