Fix context transcode

This commit is contained in:
angelblue05 2019-01-14 17:49:43 -06:00
parent f6ffd31e2d
commit ae51eabb41
3 changed files with 7 additions and 2 deletions

View file

@ -172,5 +172,5 @@ class Context(object):
def transcode(self):
filename = xbmc.getInfoLabel("ListItem.Filenameandpath")
filename += "&transcode=True"
filename += "&transcode=true"
xbmc.executebuiltin("PlayMedia(%s)" % filename)

View file

@ -69,7 +69,7 @@ class Events(object):
elif mode =='play':
item = TheVoid('GetItem', {'Id': params['id'], 'ServerId': server}).get()
Actions(server).play(item, params.get('dbid'), True if params.get('transcode') == 'True' else False, playlist=params.get('playlist') == 'true')
Actions(server).play(item, params.get('dbid'), params.get('transcode') == 'true', playlist=params.get('playlist') == 'true')
elif mode == 'playlist':
event('PlayPlaylist', {'Id': params['id'], 'ServerId': server})

View file

@ -190,6 +190,11 @@ class PlayUtils(object):
source['SupportsDirectPlay'] = False
source['Protocol'] = "LiveTV"
if self.info['ForceTranscode']:
source['SupportsDirectPlay'] = False
source['SupportsDirectStream'] = False
if source.get('Protocol') == 'Http' or source['SupportsDirectPlay'] and (self.is_strm(source) or not settings('playFromStream.bool') and self.is_file_exists(source)):
LOG.info("--[ direct play ]")