mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 13:47:05 +02:00
Allow default values for boolean config settings
This commit is contained in:
parent
6ac2b4f142
commit
7666ca53a7
4 changed files with 10 additions and 12 deletions
|
@ -56,11 +56,8 @@ func (b *ScrobblerLogBackend) Options() []models.BackendOption {
|
|||
|
||||
func (b *ScrobblerLogBackend) FromConfig(config *config.ServiceConfig) models.Backend {
|
||||
b.filePath = config.GetString("file-path")
|
||||
b.includeSkipped = config.GetBool("include-skipped")
|
||||
b.append = true
|
||||
if config.IsSet("append") {
|
||||
b.append = config.GetBool("append")
|
||||
}
|
||||
b.includeSkipped = config.GetBool("include-skipped", false)
|
||||
b.append = config.GetBool("append", true)
|
||||
b.log = ScrobblerLog{
|
||||
Timezone: "UNKNOWN",
|
||||
Client: "Rockbox unknown $Revision$",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue