diff --git a/internal/backends/spotifyhistory/spotifyhistory.go b/internal/backends/spotifyhistory/spotifyhistory.go index 304de0c..2e470e4 100644 --- a/internal/backends/spotifyhistory/spotifyhistory.go +++ b/internal/backends/spotifyhistory/spotifyhistory.go @@ -56,6 +56,11 @@ func (b *SpotifyHistoryBackend) Options() []models.BackendOption { Label: i18n.Tr("Ignore skipped listens"), Type: models.Bool, Default: "false", + }, { + Name: "ignore-min-duration-ms", + Label: i18n.Tr("Minimum playback duration for skipped tracks (milliseconds)"), + Type: models.Int, + Default: "30000", }} } @@ -63,7 +68,7 @@ func (b *SpotifyHistoryBackend) FromConfig(config *config.ServiceConfig) models. b.dirPath = config.GetString("dir-path") b.ignoreIncognito = config.GetBool("ignore-incognito", true) b.ignoreSkipped = config.GetBool("ignore-skipped", false) - b.skippedMinDurationMs = 30000 + b.skippedMinDurationMs = config.GetInt("ignore-min-duration-ms", 30000) return b }