added timeout to reload when going to next song
This commit is contained in:
parent
2d6c7bd5e4
commit
731f285071
@ -34,12 +34,16 @@ app.post("/music/playpause",(req,res) => {
|
|||||||
app.post("/music/next",(req,res) => {
|
app.post("/music/next",(req,res) => {
|
||||||
console.log("skipping to next song")
|
console.log("skipping to next song")
|
||||||
exec('echo playlist-next | socat - "/tmp/mpvsocket"')
|
exec('echo playlist-next | socat - "/tmp/mpvsocket"')
|
||||||
|
setTimeout(function() {
|
||||||
res.redirect(302, req.get("referer"));
|
res.redirect(302, req.get("referer"));
|
||||||
|
}, 750);
|
||||||
});
|
});
|
||||||
app.post("/music/prev",(req,res) => {
|
app.post("/music/prev",(req,res) => {
|
||||||
console.log("going back to previous song")
|
console.log("going back to previous song")
|
||||||
exec('echo playlist-prev | socat - "/tmp/mpvsocket"')
|
exec('echo playlist-prev | socat - "/tmp/mpvsocket"')
|
||||||
|
setTimeout(function() {
|
||||||
res.redirect(302, req.get("referer"));
|
res.redirect(302, req.get("referer"));
|
||||||
|
}, 750);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user