Fix sync if Kodi playlist has been deleted

This commit is contained in:
Croneter 2018-05-01 16:52:12 +02:00
parent 20fef65b3d
commit 8ee20b1bba

View file

@ -301,7 +301,10 @@ def full_sync():
elif playlist.plex_updatedat != api.updated_at():
LOG.debug('Detected changed Plex playlist %s: %s',
api.plex_id(), api.title())
delete_kodi_playlist(playlist)
if exists(playlist.kodi_path):
delete_kodi_playlist(playlist)
else:
update_plex_table(playlist, delete=True)
create_kodi_playlist(api.plex_id())
except PL.PlaylistError:
LOG.info('Skipping playlist %s: %s', api.plex_id(), api.title())