mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-31 07:30:32 +00:00
chore(lastfm): clearer log when a scrobble is dropped for being too old
Last.fm ignore code 3 means the timestamp is older than 14 days; spell that out instead of the generic ignored-scrobble warning.
This commit is contained in:
parent
b35ae4b0c9
commit
8dfd8f842d
@ -183,9 +183,15 @@ func (c *client) scrobble(ctx context.Context, sessionKey string, info ScrobbleI
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if resp.Scrobbles.Scrobble.IgnoredMessage.Code != "0" {
|
||||
log.Warn(ctx, "LastFM: scrobble was ignored", "code", resp.Scrobbles.Scrobble.IgnoredMessage.Code,
|
||||
"text", resp.Scrobbles.Scrobble.IgnoredMessage.Text, "info", info)
|
||||
if code := resp.Scrobbles.Scrobble.IgnoredMessage.Code; code != "0" {
|
||||
if code == "3" {
|
||||
// Last.fm rejects scrobbles whose timestamp is older than 14 days; the buffer drops it.
|
||||
log.Warn(ctx, "LastFM: scrobble dropped, timestamp too old (older than 14 days)",
|
||||
"code", code, "info", info)
|
||||
} else {
|
||||
log.Warn(ctx, "LastFM: scrobble was ignored", "code", code,
|
||||
"text", resp.Scrobbles.Scrobble.IgnoredMessage.Text, "info", info)
|
||||
}
|
||||
}
|
||||
if resp.Scrobbles.Attr.Accepted != 1 {
|
||||
log.Warn(ctx, "LastFM: scrobble was not accepted", "code", resp.Scrobbles.Scrobble.IgnoredMessage.Code,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user