mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-12 21:26:10 +00:00
Fixed transcode via context menu
This commit is contained in:
parent
d0c5cf5864
commit
f6ffd31e2d
3 changed files with 25 additions and 26 deletions
|
@ -171,6 +171,6 @@ class Context(object):
|
|||
TheVoid('DeleteItem', {'ServerId': self.server, 'Id': self.item['Id']})
|
||||
|
||||
def transcode(self):
|
||||
|
||||
item = TheVoid('GetItem', {'Id': self.item['Id'], 'ServerId': self.server}).get()
|
||||
Actions(self.server).play(item, self.kodi_id, True)
|
||||
filename = xbmc.getInfoLabel("ListItem.Filenameandpath")
|
||||
filename += "&transcode=True"
|
||||
xbmc.executebuiltin("PlayMedia(%s)" % filename)
|
||||
|
|
|
@ -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'), playlist=params.get('playlist') == 'true')
|
||||
Actions(server).play(item, params.get('dbid'), True if params.get('transcode') == 'True' else False, playlist=params.get('playlist') == 'true')
|
||||
|
||||
elif mode == 'playlist':
|
||||
event('PlayPlaylist', {'Id': params['id'], 'ServerId': server})
|
||||
|
|
|
@ -159,9 +159,8 @@ class StoppableHttpRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
try:
|
||||
params = self.get_params()
|
||||
LOG.info("Webservice called with params: %s", params)
|
||||
|
||||
path = ("plugin://plugin.video.emby?mode=play&id=%s&dbid=%s&filename=%s"
|
||||
% (params.get('Id'), params.get('KodiId'), params.get('Name')))
|
||||
path = ("plugin://plugin.video.emby?mode=play&id=%s&dbid=%s&filename=%s&transcode=%s"
|
||||
% (params.get('Id'), params.get('KodiId'), params.get('Name'), params.get('transcode') or False))
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', 'text/html')
|
||||
self.send_header('Content-Length', len(path))
|
||||
|
|
Loading…
Reference in a new issue