Handle "naked" CoverArtIDs (IDs of album, mediafiles and playlists)

This commit is contained in:
Deluan
2022-12-28 12:32:46 -05:00
committed by Deluan Quintão
parent bc09de6640
commit 61e5523457
14 changed files with 82 additions and 25 deletions
+1 -2
View File
@@ -8,7 +8,6 @@ import (
"time"
"github.com/navidrome/navidrome/conf"
"github.com/navidrome/navidrome/core"
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/server/subsonic/filter"
@@ -95,7 +94,7 @@ func (api *Router) GetMusicDirectory(r *http.Request) (*responses.Subsonic, erro
id := utils.ParamString(r, "id")
ctx := r.Context()
entity, err := core.GetEntityByID(ctx, api.ds, id)
entity, err := model.GetEntityByID(ctx, api.ds, id)
if errors.Is(err, model.ErrNotFound) {
log.Error(r, "Requested ID not found ", "id", id)
return nil, newError(responses.ErrorDataNotFound, "Directory not found")