Fallback if we didn't get any info on playing element

This commit is contained in:
croneter 2018-02-14 21:02:04 +01:00
parent 66b8559eab
commit 2e7e7fef60

View file

@ -367,6 +367,11 @@ def init_Plex_playlist(playlist, plex_id=None, kodi_item=None):
"""
LOG.debug('Initializing the playlist on the Plex side: %s', playlist)
playlist.clear(kodi=False)
if plex_id is None and kodi_item.get('id') is None:
LOG.debug('We dont know plex nor Kodi id, starting lookup')
for playerid in js.get_player_ids():
json_item = js.get_item(playerid)
kodi_item.update(json_item)
try:
if plex_id:
item = playlist_item_from_plex(plex_id)