Catch PlaylistError in PlayqueueMonitor

This commit is contained in:
croneter 2018-02-15 16:45:34 +01:00
parent aa756e60bc
commit c55b687495

View file

@ -184,6 +184,7 @@ class PlayqueueMonitor(Thread):
else:
LOG.debug('Detected new Kodi element at position %s: %s ',
i, new_item)
try:
if playqueue.id is None:
PL.init_Plex_playlist(playqueue,
kodi_item=new_item)
@ -191,6 +192,10 @@ class PlayqueueMonitor(Thread):
PL.add_item_to_PMS_playlist(playqueue,
i,
kodi_item=new_item)
except PL.PlaylistError:
# Could not add the element
pass
else:
for j in range(i, len(index)):
index[j] += 1
for i in reversed(index):