Fix Plex playlist download
This commit is contained in:
parent
df2b3810bf
commit
0cedfd7a7d
1 changed files with 4 additions and 3 deletions
|
@ -681,10 +681,11 @@ def get_PMS_playlist(playlist, playlist_id=None):
|
|||
Returns None if something went wrong
|
||||
"""
|
||||
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:
|
||||
xml.attrib['%sID' % playlist.kind]
|
||||
except (AttributeError, KeyError):
|
||||
xml.attrib
|
||||
except AttributeError:
|
||||
xml = None
|
||||
return xml
|
||||
|
||||
|
|
Loading…
Reference in a new issue