mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-01 07:21:17 +00:00
feat(artwork): log external image-lookup failures at debug
The worker's res.reader==nil && extError branch returned outcomeFailed with no log, so a failing external cover lookup (agent error, dead image URL, download timeout) was undiagnosable. Log the agent, entity, and underlying error at the fetch site where it's in hand — this surfaced a Last.fm album.getInfo returning an image URL that itself 404s.
This commit is contained in:
parent
45509d0155
commit
3588f8f391
@ -9,6 +9,7 @@ import (
|
||||
"github.com/navidrome/navidrome/conf"
|
||||
"github.com/navidrome/navidrome/consts"
|
||||
"github.com/navidrome/navidrome/core/agents"
|
||||
"github.com/navidrome/navidrome/log"
|
||||
"github.com/navidrome/navidrome/model"
|
||||
"github.com/navidrome/navidrome/utils/str"
|
||||
)
|
||||
@ -86,6 +87,7 @@ func fetchArtistImage(ctx context.Context, ag *agents.Agents, gate gateFunc, ar
|
||||
}
|
||||
if isTransientExternal(err) {
|
||||
extErr = true // includes errBreakerOpen and download failures: retry via the next agent
|
||||
log.Debug(ctx, "artwork: external artist-image lookup failed", "agent", a.Name, "artist", ar.Name, err)
|
||||
}
|
||||
}
|
||||
return nil, "", extErr
|
||||
@ -111,6 +113,7 @@ func fetchAlbumImage(ctx context.Context, ag *agents.Agents, gate gateFunc, al m
|
||||
}
|
||||
if isTransientExternal(err) {
|
||||
extErr = true
|
||||
log.Debug(ctx, "artwork: external album-image lookup failed", "agent", a.Name, "album", al.Name, err)
|
||||
}
|
||||
}
|
||||
return nil, "", extErr
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user