From d7d5e8b6e19a3e2c2a646370ea37d51f63a0d44e Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 15 Jan 2016 03:56:53 -0600 Subject: [PATCH] Force transcode 720/h265 --- resources/lib/playutils.py | 12 ++++++++++++ resources/settings.xml | 1 + 2 files changed, 13 insertions(+) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index 81bd5c42..cc04d3b2 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -97,6 +97,12 @@ class PlayUtils(): self.logMsg("Option to transcode 1080P/H265 enabled.", 1) return False + elif (utils.settings('transcode720H265') == "true" and + item['MediaSources'][0]['Name'].startswith(("720P/HEVC","720P/H265"))): + # Avoid H265 720p + self.logMsg("Option to transcode 720P/H265 enabled.", 1) + return False + canDirectPlay = item['MediaSources'][0]['SupportsDirectPlay'] # Make sure direct play is supported by the server if not canDirectPlay: @@ -197,6 +203,12 @@ class PlayUtils(): self.logMsg("Option to transcode 1080P/H265 enabled.", 1) return False + elif (utils.settings('transcode720H265') == "true" and + item['MediaSources'][0]['Name'].startswith(("720P/HEVC","720P/H265"))): + # Avoid H265 720p + self.logMsg("Option to transcode 720P/H265 enabled.", 1) + return False + # Requirement: BitRate, supported encoding canDirectStream = item['MediaSources'][0]['SupportsDirectStream'] # Make sure the server supports it diff --git a/resources/settings.xml b/resources/settings.xml index 53063d1a..5293dc61 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -48,6 +48,7 @@ +