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
|
@ -62,10 +62,7 @@ func (b *JSPFBackend) Options() []models.BackendOption {
|
|||
|
||||
func (b *JSPFBackend) FromConfig(config *config.ServiceConfig) models.Backend {
|
||||
b.filePath = config.GetString("file-path")
|
||||
b.append = true
|
||||
if config.IsSet("append") {
|
||||
b.append = config.GetBool("append")
|
||||
}
|
||||
b.append = config.GetBool("append", true)
|
||||
b.playlist = jspf.Playlist{
|
||||
Title: config.GetString("title"),
|
||||
Creator: config.GetString("username"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue