Make last commands work

master
Dario Ernst 10 years ago
parent 5dd18f35e1
commit 454817a9e4

@ -117,6 +117,40 @@ server.get('/seek/:time', function (req, res, next) {
});
});
server.get('/seekPercent/:percent', function (req, res, next) {
log.info("seekpercent "+req.params.percent);
writeCommand("seek", [req.params.percent, "absolute-percent"])
.then(function() {
res.send({"success":true});
return next(false);
}, function(reason) {
res.send({"success":false, "reason": reason});
return next(false);
});
});
server.get('/seekChapter/:where', function (req, res, next) {
log.info("seekChapter "+req.params.where);
writeCommand("add", ["chapter", req.params.where])
.then(function() {
res.send({"success":true});
return next(false);
}, function(reason) {
res.send({"success":false, "reason": reason});
return next(false);
});
});server.get('/volume/:amount', function (req, res, next) {
log.info("volume "+req.params.amount);
writeCommand("add", ["volume", req.params.amount])
.then(function() {
res.send({"success":true});
return next(false);
}, function(reason) {
res.send({"success":false, "reason": reason});
return next(false);
});
});
server.get('/volume/:amount', function (req, res, next) {
log.info("volume "+req.params.amount);
writeCommand("add", ["volume", req.params.amount])

Loading…
Cancel
Save