Fix Plex playlist download

This commit is contained in:
Croneter 2018-05-01 16:04:26 +02:00
parent df2b3810bf
commit 0cedfd7a7d

View file

@ -681,10 +681,11 @@ def get_PMS_playlist(playlist, playlist_id=None):
Returns None if something went wrong Returns None if something went wrong
""" """
playlist_id = playlist_id if playlist_id else playlist.id playlist_id = playlist_id if playlist_id else playlist.id
xml = DU().downloadUrl("{server}/%ss/%s" % (playlist.kind, playlist_id)) xml = DU().downloadUrl("{server}/%ss/%s" % (playlist.kind.lower(),
playlist_id))
try: try:
xml.attrib['%sID' % playlist.kind] xml.attrib
except (AttributeError, KeyError): except AttributeError:
xml = None xml = None
return xml return xml