Catch PlaylistError in PlayqueueMonitor
This commit is contained in:
parent
aa756e60bc
commit
c55b687495
1 changed files with 13 additions and 8 deletions
|
@ -184,15 +184,20 @@ class PlayqueueMonitor(Thread):
|
||||||
else:
|
else:
|
||||||
LOG.debug('Detected new Kodi element at position %s: %s ',
|
LOG.debug('Detected new Kodi element at position %s: %s ',
|
||||||
i, new_item)
|
i, new_item)
|
||||||
if playqueue.id is None:
|
try:
|
||||||
PL.init_Plex_playlist(playqueue,
|
if playqueue.id is None:
|
||||||
kodi_item=new_item)
|
PL.init_Plex_playlist(playqueue,
|
||||||
|
kodi_item=new_item)
|
||||||
|
else:
|
||||||
|
PL.add_item_to_PMS_playlist(playqueue,
|
||||||
|
i,
|
||||||
|
kodi_item=new_item)
|
||||||
|
except PL.PlaylistError:
|
||||||
|
# Could not add the element
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
PL.add_item_to_PMS_playlist(playqueue,
|
for j in range(i, len(index)):
|
||||||
i,
|
index[j] += 1
|
||||||
kodi_item=new_item)
|
|
||||||
for j in range(i, len(index)):
|
|
||||||
index[j] += 1
|
|
||||||
for i in reversed(index):
|
for i in reversed(index):
|
||||||
if self.stopped():
|
if self.stopped():
|
||||||
# Chances are that we got an empty Kodi playlist due to
|
# Chances are that we got an empty Kodi playlist due to
|
||||||
|
|
Loading…
Reference in a new issue