Skip to content

Commit

Permalink
Container optional playutils
Browse files Browse the repository at this point in the history
  • Loading branch information
tamara-plante committed Jan 12, 2019
1 parent ddc6b01 commit 73fefe0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/lib/helper/playutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def is_file_exists(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")

return True
Expand Down Expand Up @@ -273,7 +273,7 @@ def direct_url(self, source):
if self.item['Type'] == "Audio":
self.info['Path'] = ("%s/emby/Audio/%s/stream.%s?static=true&api_key=%s" %
(self.info['ServerAddress'], self.item['Id'],
source['Container'].split(',')[0],
source.get('Container', "mp4").split(',')[0],
self.info['Token']))
else:
self.info['Path'] = ("%s/emby/Videos/%s/stream?static=true&MediaSourceId=%s&api_key=%s" %
Expand Down

0 comments on commit 73fefe0

Please sign in to comment.