From 20cf0cece5a03a7beaa094b74866305849abcab1 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 8 Jan 2017 15:40:19 +0100 Subject: [PATCH] Revert "Abort if no xml received from PMS" This reverts commit dd40192a5136e0c04c544dc0336d3a2f89ff179c. --- resources/lib/playback_starter.py | 5 ----- resources/lib/playbackutils.py | 5 +++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index bbac8231..cf910c63 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -38,11 +38,6 @@ class Playback_Starter(Thread): # Todo: Warn user with dialog return xml = GetPlexMetadata(plex_id) - try: - xml[0].attrib - except (TypeError, AttributeError): - log.error('Could not get a PMS xml for plex id %s' % plex_id) - return if xml[0].attrib.get('type') == PLEX_TYPE_PHOTO: # Photo result = Playback_Successful() diff --git a/resources/lib/playbackutils.py b/resources/lib/playbackutils.py index fd00d50c..5eba8272 100644 --- a/resources/lib/playbackutils.py +++ b/resources/lib/playbackutils.py @@ -34,8 +34,9 @@ addonName = "PlexKodiConnect" class PlaybackUtils(): - def __init__(self, xml, callback=None, playlist_type=None): - self.xml = xml + def __init__(self, item, callback=None, playlist_type=None): + self.item = item + self.api = API(item) playlist_type = playlist_type if playlist_type else \ KODI_PLAYLIST_TYPE_FROM_PLEX_TYPE[self.api.getType()] if callback: