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
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue