mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-18 07:30:29 +00:00
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.
This commit is contained in:
parent
0dcc709743
commit
b39d25d2d6
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user