feat(server): add index-based play queue endpoints to native API (#4210)

* Add migration converting playqueue current to index

* refactor

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(queue): ensure valid current index and improve test coverage

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan Quintão
2025-06-10 23:00:44 -04:00
committed by GitHub
parent 76042ba173
commit 8fcd8ba61a
10 changed files with 398 additions and 15 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import (
type PlayQueue struct {
ID string `structs:"id" json:"id"`
UserID string `structs:"user_id" json:"userId"`
Current string `structs:"current" json:"current"`
Current int `structs:"current" json:"current"`
Position int64 `structs:"position" json:"position"`
ChangedBy string `structs:"changed_by" json:"changedBy"`
Items MediaFiles `structs:"-" json:"items,omitempty"`