From 053909196c955feea337ef8a71ab9b31917d9d28 Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 2 Nov 2021 12:23:00 -0400 Subject: [PATCH] More info in scrobbling logs --- core/agents/lastfm/client.go | 4 ++-- core/scrobbler/play_tracker.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/agents/lastfm/client.go b/core/agents/lastfm/client.go index 8bb52c964..2d0e95310 100644 --- a/core/agents/lastfm/client.go +++ b/core/agents/lastfm/client.go @@ -157,11 +157,11 @@ func (c *Client) Scrobble(ctx context.Context, sessionKey string, info ScrobbleI } 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) + "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, - "text", resp.Scrobbles.Scrobble.IgnoredMessage.Text) + "text", resp.Scrobbles.Scrobble.IgnoredMessage.Text, "info", info) } return nil } diff --git a/core/scrobbler/play_tracker.go b/core/scrobbler/play_tracker.go index 4400ccd89..465fa17b1 100644 --- a/core/scrobbler/play_tracker.go +++ b/core/scrobbler/play_tracker.go @@ -141,7 +141,7 @@ func (p *playTracker) Submit(ctx context.Context, submissions []Submission) erro } else { success++ 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 { p.dispatchScrobble(ctx, mf, s.Timestamp) }