From 77dd006f21e45bb8a4f0cc0e47cb9dca7fac1893 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 8 Jan 2016 20:13:52 -0600 Subject: [PATCH] 1.1.72 - Fix typo --- resources/lib/playutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index e2835929..b1b2fc5f 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -36,7 +36,7 @@ class PlayUtils(): item = self.item playurl = None - if item['MediaSources'][0]['Protocol'] == "Http": + if item.get('MediaSources') and item['MediaSources'][0]['Protocol'] == "Http": # Only play as http self.logMsg("File protocol is http.", 1) playurl = self.httpPlay() @@ -74,7 +74,7 @@ class PlayUtils(): itemid = item['Id'] mediatype = item['MediaType'] - if type == "Audio": + if mediatype == "Audio": playurl = "%s/emby/Audio/%s/stream" % (server, itemid) else: playurl = "%s/emby/Videos/%s/stream?static=true" % (server, itemid)