mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-16 02:42:34 +03:00
RetrieveWithMediaFiles now returns ErrIncompleteQueue when it reads the queue but a track query fails. Before, it returned the partially loaded list with no error, and a current-only PUT /api/queue could validate and map an index against that list and store the wrong track. updateQueue already fails on any retrieval error, so it now returns 500 and writes nothing. The GET handlers (getPlayQueue, getPlayQueueByIndex and GET /api/queue) treat ErrIncompleteQueue like before and still return the tracks that loaded.
19 lines
559 B
Go
19 lines
559 B
Go
package model
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/deluan/rest"
|
|
)
|
|
|
|
var (
|
|
ErrNotFound = rest.ErrNotFound
|
|
ErrInvalidAuth = errors.New("invalid authentication")
|
|
ErrNotAuthorized = rest.ErrPermissionDenied
|
|
ErrExpired = errors.New("access expired")
|
|
ErrNotAvailable = errors.New("functionality not available")
|
|
ErrValidation = errors.New("validation error")
|
|
ErrPlaylistNotEditable = errors.New("playlist tracks are not editable")
|
|
ErrIncompleteQueue = errors.New("could not load all play queue tracks")
|
|
)
|