mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
Merge pull request #82 from Hellowlol/str_ratingkey
Fix bug after ratingKey was made int.
This commit is contained in:
commit
8686e6e5bb
1 changed files with 8 additions and 5 deletions
|
@ -74,10 +74,12 @@ class Playlist(PlexPartialObject, Playable):
|
|||
if not isinstance(items, (list, tuple)):
|
||||
items = [items]
|
||||
ratingKeys = []
|
||||
|
||||
for item in items:
|
||||
if item.listType != items[0].listType:
|
||||
raise BadRequest('Can not mix media types when building a playlist')
|
||||
ratingKeys.append(item.ratingKey)
|
||||
ratingKeys.append(str(item.ratingKey))
|
||||
|
||||
ratingKeys = ','.join(ratingKeys)
|
||||
uuid = items[0].section().uuid
|
||||
path = '/playlists%s' % utils.joinArgs({
|
||||
|
@ -86,5 +88,6 @@ class Playlist(PlexPartialObject, Playable):
|
|||
'title': title,
|
||||
'smart': 0
|
||||
})
|
||||
|
||||
data = server.query(path, method=server.session.post)[0]
|
||||
return cls(server, data, initpath=path)
|
||||
|
|
Loading…
Reference in a new issue