Fix PlaylistError

This commit is contained in:
croneter 2018-02-03 14:59:43 +01:00
parent 76bd6e934a
commit 48dc22ee35

View file

@ -375,6 +375,7 @@ class KodiMonitor(Monitor):
except RuntimeError:
return
LOG.info('Need to initialize Plex and PKC playqueue')
try:
if plex_id:
item = PL.init_Plex_playlist(playqueue, plex_id=plex_id)
else:
@ -382,6 +383,10 @@ class KodiMonitor(Monitor):
kodi_item={'id': kodi_id,
'type': kodi_type,
'file': path})
except PL.PlaylistError:
LOG.info('Could not initialize our playlist')
# Avoid errors
item = PL.Playlist_Item()
# Set the Plex container key (e.g. using the Plex playqueue)
container_key = None
if info['playlistid'] != -1: