From bba42bb1bb148776a2c28c0d1dc1541d8d62bdd0 Mon Sep 17 00:00:00 2001 From: croneter Date: Tue, 20 Feb 2018 19:43:12 +0100 Subject: [PATCH] Fail setResolvedUrl on 1st run - Using add-on paths in the Kodi library, we need to make sure that the subsequent call of xbmc.setresolvedUrl fails or is forwarded once again --- resources/lib/playqueue.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/resources/lib/playqueue.py b/resources/lib/playqueue.py index 6eea9de8..3d71cfd6 100644 --- a/resources/lib/playqueue.py +++ b/resources/lib/playqueue.py @@ -185,14 +185,13 @@ class PlayqueueMonitor(Thread): else: LOG.debug('Detected new Kodi element at position %s: %s ', i, new_item) + if playqueue.id is None: + LOG.debug('Not yet initiating playback') + return try: - if playqueue.id is None: - PL.init_Plex_playlist(playqueue, - kodi_item=new_item) - else: - PL.add_item_to_PMS_playlist(playqueue, - i, - kodi_item=new_item) + PL.add_item_to_PMS_playlist(playqueue, + i, + kodi_item=new_item) except PL.PlaylistError: # Could not add the element pass