salut, j'essaie d'ajouter le bouton quitter mais cela ne fonctionne pas tout à fait. Pouvez-vous m'aider et m'améliorer si nécessaire. merci d'avance.
bouton créé.
main:
function QuickApp:buttonQuit_onReleased(event)
if debug then
self:debug("QuickApp:buttonQuit_onReleased() - deviceId :", event.deviceId, "- Element name :", event.elementName, "- Event :", event.eventType)
end
self:quit()
--
-- Quit
--
function QuickApp:quit()
if debug then
self:debug("QuickApp:quit()")
end
self:playerAction("Quit", false, "Quiting Player", KODI.ApplicationQuit)
end
KODI:
--
-- Quit player
--
function KODI:ApplicationQuit(callback)
if debug then
self:debug(tools:args("KODI:ApplicationQuit", callback))
end
-- {"jsonrpc":"2.0","method":"Application.Quit","params":{},"id":"1"}
local payload = {jsonrpc="2.0", method="Application.Quit", id={"ApplicationQuit"}}
self:postAPI("/jsonrpc", payload, function(result) return type(result) == "string" and result == "OK" and true or false end, callback)
end
Je reçois Quit failed
pouvez-vous m'aider en cas de besoin. je vous remercie d'avance
cela peut-il aussi être fait avec des sous-titres