AttributeError: 'NoneType' object has no attribute 'attrib' on playback startup

This commit is contained in:
croneter 2019-07-21 12:11:28 +02:00
parent 140030df33
commit 4b598200b9

View file

@ -234,13 +234,14 @@ def _playback_init(plex_id, plex_type, playqueue, pos):
playqueue.clear()
if plex_type != v.PLEX_TYPE_CLIP:
# Post to the PMS to create a playqueue - in any case due to Companion
section_uuid = xml.attrib.get('librarySectionUUID')
xml = PF.init_plex_playqueue(plex_id,
xml.attrib.get('librarySectionUUID'),
section_uuid,
mediatype=plex_type,
trailers=trailers)
if xml is None:
LOG.error('Could not get a playqueue xml for plex id %s, UUID %s',
plex_id, xml.attrib.get('librarySectionUUID'))
plex_id, section_uuid)
# "Play error"
utils.dialog('notification',
utils.lang(29999),