mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-13 21:56:11 +00:00
Fix context transcode
This commit is contained in:
parent
f6ffd31e2d
commit
ae51eabb41
3 changed files with 7 additions and 2 deletions
|
@ -172,5 +172,5 @@ class Context(object):
|
||||||
|
|
||||||
def transcode(self):
|
def transcode(self):
|
||||||
filename = xbmc.getInfoLabel("ListItem.Filenameandpath")
|
filename = xbmc.getInfoLabel("ListItem.Filenameandpath")
|
||||||
filename += "&transcode=True"
|
filename += "&transcode=true"
|
||||||
xbmc.executebuiltin("PlayMedia(%s)" % filename)
|
xbmc.executebuiltin("PlayMedia(%s)" % filename)
|
||||||
|
|
|
@ -69,7 +69,7 @@ class Events(object):
|
||||||
elif mode =='play':
|
elif mode =='play':
|
||||||
|
|
||||||
item = TheVoid('GetItem', {'Id': params['id'], 'ServerId': server}).get()
|
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':
|
elif mode == 'playlist':
|
||||||
event('PlayPlaylist', {'Id': params['id'], 'ServerId': server})
|
event('PlayPlaylist', {'Id': params['id'], 'ServerId': server})
|
||||||
|
|
|
@ -190,6 +190,11 @@ class PlayUtils(object):
|
||||||
source['SupportsDirectPlay'] = False
|
source['SupportsDirectPlay'] = False
|
||||||
source['Protocol'] = "LiveTV"
|
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)):
|
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 ]")
|
LOG.info("--[ direct play ]")
|
||||||
|
|
Loading…
Reference in a new issue