Fix playMedia() calls with a PlayQueue (#446)

* Fix playMedia() calls with a PlayQueue

* Fix playlists, simplify
This commit is contained in:
jjlawren 2020-04-09 22:34:14 -05:00 committed by GitHub
parent dd91ae41f4
commit cbdf5ec998
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: