From 86f4039b892d490ccd92761a4c0b435dda654c66 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 9 Jan 2016 19:41:00 -0600 Subject: [PATCH 1/4] Add HEVC transcode setting --- resources/lib/playutils.py | 10 ++++++++++ resources/settings.xml | 1 + 2 files changed, 11 insertions(+) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index b1b2fc5f..979616a6 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -96,6 +96,11 @@ class PlayUtils(): # Avoid H265 1080p self.logMsg("Option to transcode 1080P/H265 enabled.", 1) return False + elif (utils.settings('transcodeHEVC') == "true" and + item['MediaSources'][0]['Name'].startswith("1080P/HEVC")): + # Avoid H265 1080p + self.logMsg("Option to transcode 1080P/HEVC enabled.", 1) + return False canDirectPlay = item['MediaSources'][0]['SupportsDirectPlay'] # Make sure direct play is supported by the server @@ -196,6 +201,11 @@ class PlayUtils(): # Avoid H265 1080p self.logMsg("Option to transcode 1080P/H265 enabled.", 1) return False + elif (utils.settings('transcodeHEVC') == "true" and + item['MediaSources'][0]['Name'].startswith("1080P/HEVC")): + # Avoid H265 1080p + self.logMsg("Option to transcode 1080P/HEVC enabled.", 1) + return False # Requirement: BitRate, supported encoding canDirectStream = item['MediaSources'][0]['SupportsDirectStream'] diff --git a/resources/settings.xml b/resources/settings.xml index 53063d1a..2c8170ea 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -48,6 +48,7 @@ + From b465fe5c08c277ec7b7a116131fffb270b221010 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 9 Jan 2016 21:11:11 -0600 Subject: [PATCH 2/4] Revert "Add HEVC transcode setting" This reverts commit 86f4039b892d490ccd92761a4c0b435dda654c66. --- resources/lib/playutils.py | 10 ---------- resources/settings.xml | 1 - 2 files changed, 11 deletions(-) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index 979616a6..b1b2fc5f 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -96,11 +96,6 @@ class PlayUtils(): # Avoid H265 1080p self.logMsg("Option to transcode 1080P/H265 enabled.", 1) return False - elif (utils.settings('transcodeHEVC') == "true" and - item['MediaSources'][0]['Name'].startswith("1080P/HEVC")): - # Avoid H265 1080p - self.logMsg("Option to transcode 1080P/HEVC enabled.", 1) - return False canDirectPlay = item['MediaSources'][0]['SupportsDirectPlay'] # Make sure direct play is supported by the server @@ -201,11 +196,6 @@ class PlayUtils(): # Avoid H265 1080p self.logMsg("Option to transcode 1080P/H265 enabled.", 1) return False - elif (utils.settings('transcodeHEVC') == "true" and - item['MediaSources'][0]['Name'].startswith("1080P/HEVC")): - # Avoid H265 1080p - self.logMsg("Option to transcode 1080P/HEVC enabled.", 1) - return False # Requirement: BitRate, supported encoding canDirectStream = item['MediaSources'][0]['SupportsDirectStream'] diff --git a/resources/settings.xml b/resources/settings.xml index 2c8170ea..53063d1a 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -48,7 +48,6 @@ - From 86caf21af4496d167b6f497369b821444551d8ec Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 9 Jan 2016 21:25:17 -0600 Subject: [PATCH 3/4] HEVC transcode Still waiting on user feedback on this one. --- resources/lib/playutils.py | 8 ++++---- resources/settings.xml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index b1b2fc5f..852cb806 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -91,10 +91,10 @@ class PlayUtils(): self.logMsg("Can't direct play, play from HTTP enabled.", 1) return False - if (utils.settings('transcodeH265') == "true" and - item['MediaSources'][0]['Name'].startswith("1080P/H265")): - # Avoid H265 1080p - self.logMsg("Option to transcode 1080P/H265 enabled.", 1) + if (utils.settings('transcodeHEVC') == "true" and + item['MediaSources'][0]['Name'].startswith("1080P/HEVC")): + # Avoid HEVC(H265) 1080p + self.logMsg("Option to transcode 1080P/HEVC enabled.", 1) return False canDirectPlay = item['MediaSources'][0]['SupportsDirectPlay'] diff --git a/resources/settings.xml b/resources/settings.xml index 53063d1a..f5a093fc 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -47,7 +47,7 @@ - + From 2e4e983acd2b0274991f0db0664ad9803e2de69c Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 9 Jan 2016 21:30:24 -0600 Subject: [PATCH 4/4] hevc transcode - direct stream skip --- resources/lib/playutils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index 852cb806..22e30b7f 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -191,10 +191,10 @@ class PlayUtils(): item = self.item - if (utils.settings('transcodeH265') == "true" and - item['MediaSources'][0]['Name'].startswith("1080P/H265")): - # Avoid H265 1080p - self.logMsg("Option to transcode 1080P/H265 enabled.", 1) + if (utils.settings('transcodeHEVC') == "true" and + item['MediaSources'][0]['Name'].startswith("1080P/HEVC")): + # Avoid HEVC(H265) 1080p + self.logMsg("Option to transcode 1080P/HEVC enabled.", 1) return False # Requirement: BitRate, supported encoding