More info in scrobbling logs
This commit is contained in:
@@ -157,11 +157,11 @@ func (c *Client) Scrobble(ctx context.Context, sessionKey string, info ScrobbleI
|
|||||||
}
|
}
|
||||||
if resp.Scrobbles.Scrobble.IgnoredMessage.Code != "0" {
|
if resp.Scrobbles.Scrobble.IgnoredMessage.Code != "0" {
|
||||||
log.Warn(ctx, "LastFM: Scrobble was ignored", "code", resp.Scrobbles.Scrobble.IgnoredMessage.Code,
|
log.Warn(ctx, "LastFM: Scrobble was ignored", "code", resp.Scrobbles.Scrobble.IgnoredMessage.Code,
|
||||||
"text", resp.Scrobbles.Scrobble.IgnoredMessage.Text)
|
"text", resp.Scrobbles.Scrobble.IgnoredMessage.Text, "info", info)
|
||||||
}
|
}
|
||||||
if resp.Scrobbles.Attr.Accepted != 1 {
|
if resp.Scrobbles.Attr.Accepted != 1 {
|
||||||
log.Warn(ctx, "LastFM: Scrobble was not accepted", "code", resp.Scrobbles.Scrobble.IgnoredMessage.Code,
|
log.Warn(ctx, "LastFM: Scrobble was not accepted", "code", resp.Scrobbles.Scrobble.IgnoredMessage.Code,
|
||||||
"text", resp.Scrobbles.Scrobble.IgnoredMessage.Text)
|
"text", resp.Scrobbles.Scrobble.IgnoredMessage.Text, "info", info)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ func (p *playTracker) Submit(ctx context.Context, submissions []Submission) erro
|
|||||||
} else {
|
} else {
|
||||||
success++
|
success++
|
||||||
event.With("song", mf.ID).With("album", mf.AlbumID).With("artist", mf.AlbumArtistID)
|
event.With("song", mf.ID).With("album", mf.AlbumID).With("artist", mf.AlbumArtistID)
|
||||||
log.Info("Scrobbled", "title", mf.Title, "artist", mf.Artist, "user", username)
|
log.Info("Scrobbled", "title", mf.Title, "artist", mf.Artist, "user", username, "timestamp", s.Timestamp)
|
||||||
if player.ScrobbleEnabled {
|
if player.ScrobbleEnabled {
|
||||||
p.dispatchScrobble(ctx, mf, s.Timestamp)
|
p.dispatchScrobble(ctx, mf, s.Timestamp)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user