Add Kodi remote control widget (cleanup)
This commit is contained in:
@@ -32,9 +32,7 @@ function on_resume()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local ip_port = aio:get_args()[1]:split(":")
|
init_url_from_args()
|
||||||
url = "http://"..ip_port[1]..":"..ip_port[2].."/jsonrpc"
|
|
||||||
|
|
||||||
ui:show_buttons(buttons, buttons_colors)
|
ui:show_buttons(buttons, buttons_colors)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -79,6 +77,11 @@ end
|
|||||||
|
|
||||||
-- utils
|
-- utils
|
||||||
|
|
||||||
|
function init_url_from_args()
|
||||||
|
local ip_port = aio:get_args()[1]:split(":")
|
||||||
|
url = "http://"..ip_port[1]..":"..ip_port[2].."/jsonrpc"
|
||||||
|
end
|
||||||
|
|
||||||
function show_error(parsed)
|
function show_error(parsed)
|
||||||
ui:show_toast("Error "..parsed.error.code..": "..parsed.error.message)
|
ui:show_toast("Error "..parsed.error.code..": "..parsed.error.message)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user