Fix KeyError

This commit is contained in:
Croneter 2018-05-01 16:08:24 +02:00
parent 0cedfd7a7d
commit 1780b3948b

View file

@ -84,7 +84,7 @@ def create_kodi_playlist(plex_id=None):
if xml is None: if xml is None:
LOG.error('Could not get Plex playlist %s', plex_id) LOG.error('Could not get Plex playlist %s', plex_id)
return return
api = API(xml) api = API(xml[0])
playlist = PL.Playlist_Object() playlist = PL.Playlist_Object()
playlist.id = api.plex_id() playlist.id = api.plex_id()
playlist.type = v.KODI_PLAYLIST_TYPE_FROM_PLEX[api.playlist_type()] playlist.type = v.KODI_PLAYLIST_TYPE_FROM_PLEX[api.playlist_type()]