Skip to content

Commit

Permalink
Better scrobble log message when buffer is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Jul 2, 2021
1 parent 77f6bc8 commit 26b5e6b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/scrobbler/play_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (p *playTracker) dispatchNowPlaying(ctx context.Context, userId string, tra
if !s.IsAuthorized(ctx, userId) {
continue
}
log.Debug(ctx, "Sending NowPlaying info", "scrobbler", name, "track", t.Title, "artist", t.Artist)
log.Debug(ctx, "Sending NowPlaying update", "scrobbler", name, "track", t.Title, "artist", t.Artist)
err := s.NowPlaying(ctx, userId, t)
if err != nil {
log.Error(ctx, "Error sending NowPlayingInfo", "scrobbler", name, "track", t.Title, "artist", t.Artist, err)
Expand Down Expand Up @@ -171,7 +171,11 @@ func (p *playTracker) dispatchScrobble(ctx context.Context, t *model.MediaFile,
if !s.IsAuthorized(ctx, u.ID) {
continue
}
log.Debug(ctx, "Buffering scrobble", "scrobbler", name, "track", t.Title, "artist", t.Artist)
if conf.Server.DevEnableBufferedScrobble {
log.Debug(ctx, "Buffering scrobble", "scrobbler", name, "track", t.Title, "artist", t.Artist)
} else {
log.Debug(ctx, "Sending scrobble", "scrobbler", name, "track", t.Title, "artist", t.Artist)
}
err := s.Scrobble(ctx, u.ID, scrobble)
if err != nil {
log.Error(ctx, "Error sending Scrobble", "scrobbler", name, "track", t.Title, "artist", t.Artist, err)
Expand Down

0 comments on commit 26b5e6b

Please sign in to comment.