From a53203c828a9b6d2f0bf727b4db3b669289fb8f9 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 8 Jan 2017 12:35:58 +0100 Subject: [PATCH] Check xml playQueue --- resources/lib/playlist_func.py | 10 +++++----- resources/lib/playqueue.py | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/resources/lib/playlist_func.py b/resources/lib/playlist_func.py index cd94e01f..30479f74 100644 --- a/resources/lib/playlist_func.py +++ b/resources/lib/playlist_func.py @@ -209,11 +209,11 @@ def update_playlist_from_PMS(playlist, playlist_id=None, xml=None): """ if xml is None: xml = get_PMS_playlist(playlist, playlist_id) - try: - xml.attrib['%sVersion' % playlist.kind] - except: - log.error('Could not download Plex playlist.') - return + try: + xml.attrib['%sVersion' % playlist.kind] + except: + log.error('Could not download Plex playlist.') + return # Clear our existing playlist and the associated Kodi playlist playlist.clear() # Set new values diff --git a/resources/lib/playqueue.py b/resources/lib/playqueue.py index 43076f37..c58f127a 100644 --- a/resources/lib/playqueue.py +++ b/resources/lib/playqueue.py @@ -101,14 +101,18 @@ class Playqueue(Thread): startpos = None # Start playback. Player does not return in time if startpos: + log.debug('Start position Plex Companion playback: %s' + % startpos) thread = Thread(target=Player().play, args=(playqueue.kodi_pl, None, False, startpos)) else: + log.debug('Start Plex Companion playback from beginning') thread = Thread(target=Player().play, args=(playqueue.kodi_pl,)) + log.debug('Playqueues are: %s' % self.playqueues) thread.setDaemon(True) thread.start()