add support for seeking to jukebox

This commit is contained in:
Alex McGrath
2021-01-18 19:24:29 +00:00
committed by Senan Kelly
parent f16f09717c
commit 6f02b58add
2 changed files with 21 additions and 11 deletions

View File

@@ -271,7 +271,8 @@ func (c *Controller) ServeJukebox(r *http.Request) *spec.Response {
if err != nil {
return spec.NewError(10, "please provide an index for skip actions")
}
c.Jukebox.Skip(index)
offset, _ := params.GetInt("offset")
c.Jukebox.Skip(index, offset)
case "get":
sub := spec.NewResponse()
sub.JukeboxPlaylist = &spec.JukeboxPlaylist{