Abort if no xml received from PMS

This commit is contained in:
tomkat83 2017-01-08 15:40:47 +01:00
parent 20cf0cece5
commit 18cdfa192f

View file

@ -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()