Fix casting to PKC failing

This commit is contained in:
croneter 2018-08-03 20:45:10 +02:00
parent b7faecb46c
commit 3f6f557dc3
2 changed files with 6 additions and 1 deletions

View file

@ -652,7 +652,7 @@ def get_PMS_playlist(playlist, playlist_id=None):
if playlist.kind == 'playList':
xml = DU().downloadUrl("{server}/playlists/%s/items" % playlist_id)
else:
xml = DU().downloadUrl("{server}/playqueues/%s" % playlist_id)
xml = DU().downloadUrl("{server}/playQueues/%s" % playlist_id)
try:
xml.attrib
except AttributeError:

View file

@ -48,6 +48,11 @@ def update_playqueue_from_PMS(playqueue,
transient_token = playqueue.plex_transient_token
with state.LOCK_PLAYQUEUES:
xml = PL.get_PMS_playlist(playqueue, playqueue_id)
try:
xml.attrib
except AttributeError:
LOG.error('Could now download playqueue %s', playqueue_id)
return
playqueue.clear()
try:
PL.get_playlist_details_from_xml(playqueue, xml)