Container optional playutils

This commit is contained in:
angelblue05 2019-01-11 20:34:40 -06:00
parent ddc6b01055
commit 73fefe057d

View file

@ -168,7 +168,7 @@ class PlayUtils(object):
def is_strm(self, source): def is_strm(self, source):
if source['Container'] == 'strm' or self.item['Path'].endswith('.strm'): if source.get('Container') == 'strm' or self.item['Path'].endswith('.strm'):
LOG.info("strm detected") LOG.info("strm detected")
return True return True
@ -273,7 +273,7 @@ class PlayUtils(object):
if self.item['Type'] == "Audio": if self.item['Type'] == "Audio":
self.info['Path'] = ("%s/emby/Audio/%s/stream.%s?static=true&api_key=%s" % self.info['Path'] = ("%s/emby/Audio/%s/stream.%s?static=true&api_key=%s" %
(self.info['ServerAddress'], self.item['Id'], (self.info['ServerAddress'], self.item['Id'],
source['Container'].split(',')[0], source.get('Container', "mp4").split(',')[0],
self.info['Token'])) self.info['Token']))
else: else:
self.info['Path'] = ("%s/emby/Videos/%s/stream?static=true&MediaSourceId=%s&api_key=%s" % self.info['Path'] = ("%s/emby/Videos/%s/stream?static=true&MediaSourceId=%s&api_key=%s" %