Revert changes for transcode pull request

causes errors atm and don't have time to check it out.
This commit is contained in:
angelblue05 2017-12-17 21:45:45 -06:00
parent 5aeb22aa91
commit e2a183a08b
3 changed files with 10 additions and 16 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.emby" <addon id="plugin.video.emby"
name="Emby" name="Emby"
version="2.3.60" version="2.3.61"
provider-name="Emby.media"> provider-name="Emby.media">
<requires> <requires>
<import addon="xbmc.python" version="2.19.0"/> <import addon="xbmc.python" version="2.19.0"/>

View file

@ -27,7 +27,7 @@ class Credentials(object):
def setPath(self, path): def setPath(self, path):
# Path to save persistant data.txt # Path to save persistant data.txt
self.path = path.encode('utf-8') self.path = path
def _ensure(self): def _ensure(self):

View file

@ -139,13 +139,12 @@ class PlayUtils():
log.info("Can't direct play, play from HTTP enabled.") log.info("Can't direct play, play from HTTP enabled.")
return False return False
vid = self.getVideoStreamID() videotrack = self.item['MediaSources'][0]['Name']
videotrack = self.item['MediaStreams'][vid]['DisplayTitle']
transcodeH265 = settings('transcodeH265') transcodeH265 = settings('transcodeH265')
videoprofile = self.item['MediaStreams'][vid]['Profile'] videoprofiles = [x['Profile'] for x in self.item['MediaSources'][0]['MediaStreams'] if 'Profile' in x]
transcodeHi10P = settings('transcodeHi10P') transcodeHi10P = settings('transcodeHi10P')
if transcodeHi10P == "true" and ("Main 10" in videoprofile or "High 10" in videoprofile) and ("H264" in videotrack or "H265" in videotrack or "HEVC" in videotrack): 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):
@ -243,13 +242,12 @@ class PlayUtils():
def isDirectStream(self): def isDirectStream(self):
vid = self.getVideoStreamID() videotrack = self.item['MediaSources'][0]['Name']
videotrack = self.item['MediaStreams'][vid]['DisplayTitle']
transcodeH265 = settings('transcodeH265') transcodeH265 = settings('transcodeH265')
videoprofile = self.item['MediaStreams'][vid]['Profile'] videoprofiles = [x['Profile'] for x in self.item['MediaSources'][0]['MediaStreams'] if 'Profile' in x]
transcodeHi10P = settings('transcodeHi10P') transcodeHi10P = settings('transcodeHi10P')
if transcodeHi10P == "true" and ("Main 10" in videoprofile or "High 10" in videoprofile) and ("H264" in videotrack or "H265" in videotrack or "HEVC" in videotrack): 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):
@ -707,7 +705,3 @@ class PlayUtils():
log.debug(self.item) log.debug(self.item)
return False return False
def getVideoStreamID(self):
# Sometimes video stream is not 0, this locates it.
videx = [x['Index'] for x in self.item['MediaSources'][0]['MediaStreams'] if 'Video' in x['Type']]
return videx[0]