Fix TV sections not being deleted e.g. after user switch
This commit is contained in:
parent
1e499ebfe6
commit
dcff85e203
1 changed files with 4 additions and 4 deletions
|
@ -215,16 +215,16 @@ def delete_sections(old_sections):
|
||||||
LOG.info("Removing entire Plex library sections: %s", old_sections)
|
LOG.info("Removing entire Plex library sections: %s", old_sections)
|
||||||
with kodi_db.KodiVideoDB(texture_db=True) as kodidb:
|
with kodi_db.KodiVideoDB(texture_db=True) as kodidb:
|
||||||
for section in old_sections:
|
for section in old_sections:
|
||||||
if section[2] == v.KODI_TYPE_PHOTO:
|
if section[2] == v.PLEX_TYPE_PHOTO:
|
||||||
# not synced
|
# not synced
|
||||||
plexdb.remove_section(section[0])
|
plexdb.remove_section(section[0])
|
||||||
continue
|
continue
|
||||||
elif section[2] == v.KODI_TYPE_MOVIE:
|
elif section[2] == v.PLEX_TYPE_MOVIE:
|
||||||
video_library_update = True
|
video_library_update = True
|
||||||
context = itemtypes.Movie(None,
|
context = itemtypes.Movie(None,
|
||||||
plexdb=plexdb,
|
plexdb=plexdb,
|
||||||
kodidb=kodidb)
|
kodidb=kodidb)
|
||||||
elif section[2] == v.KODI_TYPE_SHOW:
|
elif section[2] == v.PLEX_TYPE_SHOW:
|
||||||
video_library_update = True
|
video_library_update = True
|
||||||
context = itemtypes.Show(None,
|
context = itemtypes.Show(None,
|
||||||
plexdb=plexdb,
|
plexdb=plexdb,
|
||||||
|
@ -238,7 +238,7 @@ def delete_sections(old_sections):
|
||||||
|
|
||||||
with kodi_db.KodiMusicDB(texture_db=True) as kodidb:
|
with kodi_db.KodiMusicDB(texture_db=True) as kodidb:
|
||||||
for section in old_sections:
|
for section in old_sections:
|
||||||
if section[2] == v.KODI_TYPE_ARTIST:
|
if section[2] == v.PLEX_TYPE_ARTIST:
|
||||||
music_library_update = True
|
music_library_update = True
|
||||||
context = itemtypes.Artist(None,
|
context = itemtypes.Artist(None,
|
||||||
plexdb=plexdb,
|
plexdb=plexdb,
|
||||||
|
|
Loading…
Reference in a new issue