mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Prevent subtitles for certain types
This commit is contained in:
parent
0883c704f5
commit
f7872aea07
1 changed files with 6 additions and 3 deletions
|
@ -255,14 +255,15 @@ class PlayUtils():
|
||||||
def get_direct_url(self, source):
|
def get_direct_url(self, source):
|
||||||
|
|
||||||
self.method = "DirectStream"
|
self.method = "DirectStream"
|
||||||
|
media_type = self.item['Type']
|
||||||
|
|
||||||
if self.item['Type'] == "Audio":
|
if media_type == "Audio":
|
||||||
url = "%s/emby/Audio/%s/stream.%s?static=true" % (self.server, self.item['Id'], self.item['MediaSources'][0]['Container'])
|
url = "%s/emby/Audio/%s/stream.%s?static=true" % (self.server, self.item['Id'], self.item['MediaSources'][0]['Container'])
|
||||||
else:
|
else:
|
||||||
url = "%s/emby/Videos/%s/stream?static=true" % (self.server, self.item['Id'])
|
url = "%s/emby/Videos/%s/stream?static=true" % (self.server, self.item['Id'])
|
||||||
|
|
||||||
# Append external subtitles
|
# Append external subtitles
|
||||||
if settings('enableExternalSubs') == "true":
|
if media_type in ('Movie', 'Episode') and settings('enableExternalSubs') == "true":
|
||||||
self.set_external_subs(source, url)
|
self.set_external_subs(source, url)
|
||||||
|
|
||||||
return url
|
return url
|
||||||
|
@ -272,6 +273,7 @@ class PlayUtils():
|
||||||
self.method = "Transcode"
|
self.method = "Transcode"
|
||||||
|
|
||||||
item_id = self.item['Id']
|
item_id = self.item['Id']
|
||||||
|
media_type = self.item['Type']
|
||||||
url = urllib_path("%s/emby/Videos/%s/master.m3u8" % (self.server, item_id), {
|
url = urllib_path("%s/emby/Videos/%s/master.m3u8" % (self.server, item_id), {
|
||||||
|
|
||||||
'VideoCodec': "h264",
|
'VideoCodec': "h264",
|
||||||
|
@ -282,7 +284,8 @@ class PlayUtils():
|
||||||
})
|
})
|
||||||
|
|
||||||
# Select audio and subtitles
|
# Select audio and subtitles
|
||||||
url += self.get_audio_subs(source)
|
if media_type in ('Movie', 'Episode'):
|
||||||
|
url += self.get_audio_subs(source)
|
||||||
|
|
||||||
# Limit to 8 bit if user selected transcode Hi10P
|
# Limit to 8 bit if user selected transcode Hi10P
|
||||||
if settings('transcodeHi10P') == "true":
|
if settings('transcodeHi10P') == "true":
|
||||||
|
|
Loading…
Reference in a new issue