2018-09-09, 13:40
Hi guys,
I was able to activate custom window ID with jsaon-RPC and addon script.
the addon script:
import xbmc
import xbmcgui
import xbmcplugin
import xbmcaddon
xbmc.executebuiltin('ActivateWindow(1199)')
the json-rpc script:
import requests
import xbmc
import xbmcgui
import xbmcplugin
import xbmcaddon
headers = {
'Content-Type': 'application/json',
}
data = '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.activatewindowid","params":{"windowid":"1199"}},"id":1}'
response = requests.post('http://192.168.1.200:8080/jsonrpc',
headers=headers,
data=data,
auth=('kodi', '1234'))
My question what if I want to be able to choose which window to be activated for example:
I want to create two buttons :
1- button-1 will activate window id 1199
2-button-2 will activate window id 1150
those buttons are in the sender kodi but the window id in the receiver kodi
How can I do that, please
thanks for all
I was able to activate custom window ID with jsaon-RPC and addon script.
the addon script:
import xbmc
import xbmcgui
import xbmcplugin
import xbmcaddon
xbmc.executebuiltin('ActivateWindow(1199)')
the json-rpc script:
import requests
import xbmc
import xbmcgui
import xbmcplugin
import xbmcaddon
headers = {
'Content-Type': 'application/json',
}
data = '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.activatewindowid","params":{"windowid":"1199"}},"id":1}'
response = requests.post('http://192.168.1.200:8080/jsonrpc',
headers=headers,
data=data,
auth=('kodi', '1234'))
My question what if I want to be able to choose which window to be activated for example:
I want to create two buttons :
1- button-1 will activate window id 1199
2-button-2 will activate window id 1150
those buttons are in the sender kodi but the window id in the receiver kodi
How can I do that, please
thanks for all