From 18cdfa192f592f69f6687bd1c000adeabe4d837c Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 8 Jan 2017 15:40:47 +0100 Subject: [PATCH] Abort if no xml received from PMS --- resources/lib/playback_starter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index cf910c63..bbac8231 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -38,6 +38,11 @@ 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()