make scrobbling configurable

This commit is contained in:
Drew Weymouth
2023-03-23 17:36:41 -07:00
parent 0af281c3ad
commit 0cdbf912c9
3 changed files with 33 additions and 13 deletions
+12
View File
@@ -52,6 +52,12 @@ type LocalPlaybackConfig struct {
Volume int
}
type ScrobbleConfig struct {
Enabled bool
ThresholdTimeSeconds int
ThresholdPercent int
}
type Config struct {
Application AppConfig
Servers []*ServerConfig
@@ -62,6 +68,7 @@ type Config struct {
NowPlayingPage NowPlayingPageConfig
PlaylistPage PlaylistPageConfig
LocalPlayback LocalPlaybackConfig
Scrobbling ScrobbleConfig
}
func DefaultConfig() *Config {
@@ -94,6 +101,11 @@ func DefaultConfig() *Config {
AudioExclusive: false,
Volume: 100,
},
Scrobbling: ScrobbleConfig{
Enabled: true,
ThresholdTimeSeconds: 240,
ThresholdPercent: 50,
},
}
}