mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Simplify logic
This commit is contained in:
parent
d258f0d14c
commit
9eb9cd1e61
2 changed files with 4 additions and 6 deletions
|
@ -385,13 +385,10 @@ class PlayUtils(object):
|
||||||
def get_transcoding_video_codec(self):
|
def get_transcoding_video_codec(self):
|
||||||
codecs = ["h264", "mpeg4", "mpeg2video", "vc1"]
|
codecs = ["h264", "mpeg4", "mpeg2video", "vc1"]
|
||||||
|
|
||||||
if not settings("transcode_h265.bool"):
|
|
||||||
codecs.insert(1, "hevc") # Add HEVC if transcoding is not forced
|
|
||||||
|
|
||||||
if settings("videoPreferredCodec") == "H265/HEVC":
|
if settings("videoPreferredCodec") == "H265/HEVC":
|
||||||
if "hevc" in codecs:
|
codecs.insert(0, "hevc")
|
||||||
codecs.remove("hevc")
|
elif not settings("transcode_h265.bool"):
|
||||||
codecs.insert(0, "hevc") # Add HEVC at the beginning if preferred
|
codecs.insert(1, "hevc")
|
||||||
|
|
||||||
if settings("transcode_mpeg2.bool"):
|
if settings("transcode_mpeg2.bool"):
|
||||||
codecs.remove("mpeg2video")
|
codecs.remove("mpeg2video")
|
||||||
|
|
|
@ -34,6 +34,7 @@ class PatchedSettings:
|
||||||
setting = setting.replace(".bool", "")
|
setting = setting.replace(".bool", "")
|
||||||
value = bool(value)
|
value = bool(value)
|
||||||
cls.settings[setting] = value
|
cls.settings[setting] = value
|
||||||
|
return None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def clear(cls):
|
def clear(cls):
|
||||||
|
|
Loading…
Reference in a new issue