From b39d25d2d692b551e17efec93f956825eeed31a1 Mon Sep 17 00:00:00 2001 From: Timo <101946596+timonet7@users.noreply.github.com> Date: Tue, 13 Oct 2026 12:40:36 +0200 Subject: [PATCH] Fix condition to check song duration for scrobbling Changed from <= to < to ensure the scrobbling of a track that is exactly the duration of MinScrobbleDuration. Also ensures that MinScrobbleDuration = 0 will always lead to a scrobble, as a track with a duration of 0 (which I didn't think of) would otherwise be skipped. --- adapters/lastfm/agent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/lastfm/agent.go b/adapters/lastfm/agent.go index 8130cea3c..60a0fcccc 100644 --- a/adapters/lastfm/agent.go +++ b/adapters/lastfm/agent.go @@ -388,7 +388,7 @@ func (l *lastfmAgent) Scrobble(ctx context.Context, userId string, s scrobbler.S return errors.Join(err, scrobbler.ErrNotAuthorized) } - if s.Duration <= float32(conf.Server.LastFM.MinScrobbleDuration.Seconds()) { + if s.Duration < float32(conf.Server.LastFM.MinScrobbleDuration.Seconds()) { log.Debug(ctx, "Skipping Last.fm scrobble for short song", "track", s.Title, "duration", s.Duration) return nil }