mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-18 08:08:45 +01:00
chore(artwork): generic 500 bodies on refresh endpoint, trim stale test comments
This commit is contained in:
parent
dfd4bec270
commit
c2d7ae773c
3 changed files with 6 additions and 8 deletions
|
|
@ -34,14 +34,14 @@ func (api *Router) refreshArtwork() http.HandlerFunc {
|
|||
}
|
||||
if err := api.ds.Artwork(ctx).DeleteForItem(kind, id); err != nil {
|
||||
log.Error(ctx, "Error clearing artwork state", "kind", kind, "id", id, err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
item := model.ArtworkQueueItem{ItemKind: kind, ItemID: id, ImageType: model.ImageTypePrimary,
|
||||
Priority: model.ArtworkPriorityBump}
|
||||
if err := api.ds.ArtworkQueue(ctx).Enqueue(item); err != nil {
|
||||
log.Error(ctx, "Error enqueuing artwork refresh", "kind", kind, "id", id, err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue