From 59696da287349a7840c32d9882bc5208137477a9 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 31 Mar 2018 06:31:28 -0500 Subject: [PATCH] Revert "Prevent subtitles for certain types" This reverts commit f7872aea07f805d9173085e1f3bf7016a5aadac8. --- resources/lib/playutils.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index 173edb56..6ed1302f 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -255,15 +255,14 @@ class PlayUtils(): def get_direct_url(self, source): self.method = "DirectStream" - media_type = self.item['Type'] - if media_type == "Audio": + if self.item['Type'] == "Audio": url = "%s/emby/Audio/%s/stream.%s?static=true" % (self.server, self.item['Id'], self.item['MediaSources'][0]['Container']) else: url = "%s/emby/Videos/%s/stream?static=true" % (self.server, self.item['Id']) # Append external subtitles - if media_type in ('Movie', 'Episode') and settings('enableExternalSubs') == "true": + if settings('enableExternalSubs') == "true": self.set_external_subs(source, url) return url @@ -273,7 +272,6 @@ class PlayUtils(): self.method = "Transcode" item_id = self.item['Id'] - media_type = self.item['Type'] url = urllib_path("%s/emby/Videos/%s/master.m3u8" % (self.server, item_id), { 'VideoCodec': "h264", @@ -284,8 +282,7 @@ class PlayUtils(): }) # Select audio and subtitles - if media_type in ('Movie', 'Episode'): - url += self.get_audio_subs(source) + url += self.get_audio_subs(source) # Limit to 8 bit if user selected transcode Hi10P if settings('transcodeHi10P') == "true":