diff --git a/resources/lib/playbackutils.py b/resources/lib/playbackutils.py index a6e214be..ae0165f6 100644 --- a/resources/lib/playbackutils.py +++ b/resources/lib/playbackutils.py @@ -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 diff --git a/resources/lib/playlist_func.py b/resources/lib/playlist_func.py index ee2794f5..d3f31ef9 100644 --- a/resources/lib/playlist_func.py +++ b/resources/lib/playlist_func.py @@ -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)