mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Update playutils.py
Add in videoprofile check and force transcode for Hi10P
This commit is contained in:
parent
27f8771642
commit
6cb056c987
1 changed files with 11 additions and 1 deletions
|
@ -102,7 +102,12 @@ class PlayUtils():
|
|||
|
||||
videotrack = self.item['MediaSources'][0]['Name']
|
||||
transcodeH265 = settings('transcodeH265')
|
||||
videoprofile = self.item['MediaSources'][1]['Name']
|
||||
transcodeHi10P = settings('transcodeHi10P')
|
||||
|
||||
if transcodeHi10P == "true" and "H264" in videotrack and "High 10" in videoprofile:
|
||||
return False
|
||||
|
||||
if transcodeH265 in ("1", "2", "3") and ("HEVC" in videotrack or "H265" in videotrack):
|
||||
# Avoid H265/HEVC depending on the resolution
|
||||
resolution = int(videotrack.split("P", 1)[0])
|
||||
|
@ -207,6 +212,11 @@ class PlayUtils():
|
|||
|
||||
videotrack = self.item['MediaSources'][0]['Name']
|
||||
transcodeH265 = utils.settings('transcodeH265')
|
||||
videoprofile = self.item['MediaSources'][1]['Name']
|
||||
transcodeHi10P = settings('transcodeHi10P')
|
||||
|
||||
if transcodeHi10P == "true" and "H264" in videotrack and "High 10" in videoprofile:
|
||||
return False
|
||||
|
||||
if transcodeH265 in ("1", "2", "3") and ("HEVC" in videotrack or "H265" in videotrack):
|
||||
# Avoid H265/HEVC depending on the resolution
|
||||
|
@ -423,4 +433,4 @@ class PlayUtils():
|
|||
else:
|
||||
playurlprefs += "&AudioBitrate=192000"
|
||||
|
||||
return playurlprefs
|
||||
return playurlprefs
|
||||
|
|
Loading…
Reference in a new issue