Release Control Kodi with your Google Home
#35
Been playing with seek, I'm getting there but haven't quite figured it out yet

//seek forward x seconds
app.get("/seekforward", function(request, response) {
validateRequest(request,response,kodiSeek)
});

var kodiSeek = function(request, response){
var seekForward = request.query.q.trim();
kodi.Player.Seek({playerid:1,"seconds":parseInt(seekForward)});
response.sendStatus(200);
};

Anyone feel like debugging?
________________________________(edit)

Think I have got it:
app.get("/seekforward", function(request, response) {
validateRequest(request,response,kodiSeek)
});

var kodiSeek = function(request, response){
var seekForward = request.query.q.trim();
kodi.Player.Seek({"playerid":1,"value":{"seconds":parseInt(seekForward)} });
response.sendStatus(200);
};

Now working on seeking backwards (figuring out how to change an int to a negative int) - still not bug free
Reply


Messages In This Thread
RE: Control Kodi with your Google Home - by Keljian - 2017-08-20, 10:32


Logout Mark Read Team Forum Stats Members Help
Control Kodi with your Google Home4
This forum uses Lukasz Tkacz MyBB addons.