Fix playback startup via PMS

This commit is contained in:
tomkat83 2017-01-10 21:45:15 +01:00
parent 2d67bb1c1d
commit 8946598b06
2 changed files with 5 additions and 4 deletions

View file

@ -206,15 +206,15 @@ class PlaybackUtils():
api.set_listitem_artwork(listitem)
add_listitem_to_Kodi_playlist(
playqueue,
self.currentPosition,
self.currentPosition+1,
convert_PKC_to_listitem(listitem),
playurl,
xml_video_element=item)
kodi_item={'id': kodi_id, 'type': kodi_type})
else:
# Full metadata$
add_item_to_kodi_playlist(
playqueue,
self.currentPosition,
self.currentPosition+1,
kodi_id,
kodi_type)
self.currentPosition += 1

View file

@ -253,7 +253,8 @@ def add_listitem_to_playlist(playlist, pos, listitem, kodi_id=None,
If file is not None, file will overrule kodi_id!
"""
log.debug('add_listitem_to_playlist. Playlist before add: %s' % playlist)
log.debug('add_listitem_to_playlist at position %s. Playlist before add: '
'%s' % (pos, playlist))
kodi_item = {'id': kodi_id, 'type': kodi_type, 'file': file}
if playlist.ID is None:
init_Plex_playlist(playlist, plex_id, kodi_item)