mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 12:16:12 +00:00
Fix force transcode
This commit is contained in:
parent
4c602b67c8
commit
ef00029ed0
1 changed files with 9 additions and 7 deletions
|
@ -79,15 +79,15 @@ class PlayUtils():
|
||||||
log.debug("MediaType not video detected.")
|
log.debug("MediaType not video detected.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if self.item['Type'] == 'TvChannel':
|
elif self.item['Type'] == 'TvChannel':
|
||||||
log.debug("TvChannel detected.")
|
log.debug("TvChannel detected.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if len(self.item['MediaSources']) == 1 and self.item['MediaSources'][0]['Type'] == 'Placeholder':
|
elif len(self.item['MediaSources']) == 1 and self.item['MediaSources'][0]['Type'] == 'Placeholder':
|
||||||
log.debug("Placeholder detected.")
|
log.debug("Placeholder detected.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if 'SourceType' in self.item and self.item['SourceType'] != 'Library':
|
elif 'SourceType' in self.item and self.item['SourceType'] != 'Library':
|
||||||
log.debug("SourceType not library detected.")
|
log.debug("SourceType not library detected.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -137,8 +137,8 @@ class PlayUtils():
|
||||||
returned that can actually be played by this client so no need to check bitrates etc.
|
returned that can actually be played by this client so no need to check bitrates etc.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
if (not self.force_transcode and self.is_h265(source) or self.is_strm(source) or
|
if (not self.force_transcode and (self.is_h265(source) or self.is_strm(source) or
|
||||||
(source['SupportsDirectPlay'] and settings('playFromStream') == "false" and self.is_file_exists(source))):
|
(source['SupportsDirectPlay'] and settings('playFromStream') == "false" and self.is_file_exists(source)))):
|
||||||
# Do nothing, path is updated with our verification if applies.
|
# Do nothing, path is updated with our verification if applies.
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
@ -411,6 +411,7 @@ class PlayUtils():
|
||||||
|
|
||||||
if self.info.get('AudioStreamIndex'):
|
if self.info.get('AudioStreamIndex'):
|
||||||
audio_selected = self.info['AudioStreamIndex']
|
audio_selected = self.info['AudioStreamIndex']
|
||||||
|
|
||||||
elif skip_dialog in (0, 1):
|
elif skip_dialog in (0, 1):
|
||||||
if len(audio_streams) > 1:
|
if len(audio_streams) > 1:
|
||||||
selection = list(audio_streams.keys())
|
selection = list(audio_streams.keys())
|
||||||
|
@ -458,7 +459,9 @@ class PlayUtils():
|
||||||
|
|
||||||
def get_bitrate(self):
|
def get_bitrate(self):
|
||||||
|
|
||||||
# get the addon video quality
|
''' Get the addon video quality
|
||||||
|
Max bit rate supported by server: 2147483 (max signed 32bit integer)
|
||||||
|
'''
|
||||||
|
|
||||||
bitrate = {
|
bitrate = {
|
||||||
|
|
||||||
|
@ -485,7 +488,6 @@ class PlayUtils():
|
||||||
'17': 100000,
|
'17': 100000,
|
||||||
'18': 1000000
|
'18': 1000000
|
||||||
}
|
}
|
||||||
# max bit rate supported by server (max signed 32bit integer)
|
|
||||||
return bitrate.get(settings('videoBitrate'), 2147483)
|
return bitrate.get(settings('videoBitrate'), 2147483)
|
||||||
|
|
||||||
def get_device_profile(self):
|
def get_device_profile(self):
|
||||||
|
|
Loading…
Reference in a new issue