mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 10:46:11 +00:00
Update playutils.py
Condense videoprofiles check
This commit is contained in:
parent
055366753a
commit
04377c5a9c
1 changed files with 7 additions and 15 deletions
|
@ -101,14 +101,10 @@ class PlayUtils():
|
||||||
|
|
||||||
videotrack = self.item['MediaSources'][0]['Name']
|
videotrack = self.item['MediaSources'][0]['Name']
|
||||||
transcodeH265 = settings('transcodeH265')
|
transcodeH265 = settings('transcodeH265')
|
||||||
videoprofiles = self.item['MediaSources'][0]['MediaStreams']
|
videoprofiles = [x['Profile'] for x in self.item['MediaSources'][0]['MediaStreams'] if 'Profile' in x]
|
||||||
streamprofiles = []
|
|
||||||
for vprofile in videoprofiles:
|
|
||||||
if "Profile" in vprofile:
|
|
||||||
streamprofiles.append(vprofile['Profile'])
|
|
||||||
transcodeHi10P = utils.settings('transcodeHi10P')
|
transcodeHi10P = utils.settings('transcodeHi10P')
|
||||||
|
|
||||||
if transcodeHi10P == "true" and "H264" in videotrack and "High 10" in streamprofiles:
|
if transcodeHi10P == "true" and "H264" in videotrack and "High 10" in videoprofiles:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if transcodeH265 in ("1", "2", "3") and ("HEVC" in videotrack or "H265" in videotrack):
|
if transcodeH265 in ("1", "2", "3") and ("HEVC" in videotrack or "H265" in videotrack):
|
||||||
|
@ -215,14 +211,10 @@ class PlayUtils():
|
||||||
|
|
||||||
videotrack = self.item['MediaSources'][0]['Name']
|
videotrack = self.item['MediaSources'][0]['Name']
|
||||||
transcodeH265 = utils.settings('transcodeH265')
|
transcodeH265 = utils.settings('transcodeH265')
|
||||||
videoprofiles = self.item['MediaSources'][0]['MediaStreams']
|
videoprofiles = [x['Profile'] for x in self.item['MediaSources'][0]['MediaStreams'] if 'Profile' in x]
|
||||||
streamprofiles = []
|
|
||||||
for vprofile in videoprofiles:
|
|
||||||
if "Profile" in vprofile:
|
|
||||||
streamprofiles.append(vprofile['Profile'])
|
|
||||||
transcodeHi10P = utils.settings('transcodeHi10P')
|
transcodeHi10P = utils.settings('transcodeHi10P')
|
||||||
|
|
||||||
if transcodeHi10P == "true" and "H264" in videotrack and "High 10" in streamprofiles:
|
if transcodeHi10P == "true" and "H264" in videotrack and "High 10" in videoprofiles:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if transcodeH265 in ("1", "2", "3") and ("HEVC" in videotrack or "H265" in videotrack):
|
if transcodeH265 in ("1", "2", "3") and ("HEVC" in videotrack or "H265" in videotrack):
|
||||||
|
|
Loading…
Reference in a new issue