mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
spotify-history: min. playback time for skipped tracks is now in seconds
This commit is contained in:
parent
01380bd730
commit
60bbbb9f15
2 changed files with 15 additions and 15 deletions
|
@ -28,9 +28,9 @@ import (
|
|||
type StreamingHistory []HistoryItem
|
||||
|
||||
type ListenListOptions struct {
|
||||
IgnoreIncognito bool
|
||||
IgnoreSkipped bool
|
||||
SkippedMinDurationMs int
|
||||
IgnoreIncognito bool
|
||||
IgnoreSkipped bool
|
||||
skippedMinSeconds int
|
||||
}
|
||||
|
||||
type HistoryItem struct {
|
||||
|
@ -72,7 +72,7 @@ func (h *StreamingHistory) AsListenList(opt ListenListOptions) models.ListensLis
|
|||
if item.MasterMetadataTrackName == "" ||
|
||||
(opt.IgnoreIncognito && item.IncognitoMode) ||
|
||||
(opt.IgnoreSkipped && item.Skipped) ||
|
||||
(item.Skipped && item.MillisecondsPlayed < opt.SkippedMinDurationMs) {
|
||||
(item.Skipped && item.MillisecondsPlayed < opt.skippedMinSeconds*1000) {
|
||||
continue
|
||||
}
|
||||
listens = append(listens, item.AsListen())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue