mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 12:58:26 +00:00
Fix playMedia() calls with a PlayQueue (#446)
* Fix playMedia() calls with a PlayQueue * Fix playlists, simplify
This commit is contained in:
parent
dd91ae41f4
commit
cbdf5ec998
1 changed files with 8 additions and 3 deletions
|
@ -475,10 +475,15 @@ class PlexClient(PlexObject):
|
|||
|
||||
if hasattr(media, "playlistType"):
|
||||
mediatype = media.playlistType
|
||||
elif media.listType == "audio":
|
||||
mediatype = "music"
|
||||
else:
|
||||
mediatype = "video"
|
||||
if isinstance(media, PlayQueue):
|
||||
mediatype = media.items[0].listType
|
||||
else:
|
||||
mediatype = media.listType
|
||||
|
||||
# mediatype must be in ["video", "music", "photo"]
|
||||
if mediatype == "audio":
|
||||
mediatype = "music"
|
||||
|
||||
if self.product != 'OpenPHT':
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue