Fix KeyError when synching playlists

- Should fix #568
This commit is contained in:
croneter 2018-12-09 13:10:15 +01:00
parent 4f750379f1
commit dac7cdd47e

View file

@ -93,9 +93,9 @@ def m3u_to_plex_ids(playlist):
if not kodi_id:
continue
with PlexDB() as plexdb:
plex_id = plexdb.item_by_kodi_id(kodi_id, kodi_type)
if plex_id:
plex_ids.append(plex_id[0])
item = plexdb.item_by_kodi_id(kodi_id, kodi_type)
if item:
plex_ids.append(item['plex_id'])
return plex_ids