Fixup groupings in toml parsing ; update example config
continuous-integration/drone/tag Build is failing Details

This commit is contained in:
KemoNine 2020-09-20 20:33:07 -04:00
parent 39451ec3b3
commit d335e1f85a
2 changed files with 23 additions and 12 deletions

View File

@ -10,18 +10,29 @@ The GUI uses a config similar to the following. To generate a default config, la
``` ```
# Slideshow intervals config-ui-only = false
slideshow.slideinterval = "300s"
slideshow.restartinterval = "168h"
# These are SYSTEMD.TIME formatted times [albums]
# You probably want to just adjust the actual times here root = "/tank/pictures"
# See https://www.freedesktop.org/software/systemd/man/systemd.time.html selected = ["/", "/KemoNine"]
hdmi.off = "*-*-* 00:00:00"
hdmi.on = "*-*-* 06:00:00" [fan]
minspeed = 10.0
pollinginterval = "30s"
[fan.speeds]
100 = 55.0
25 = 45.0
50 = 50.0
75 = 52.0
[hdmi]
off = "*-*-* 00:00:00"
on = "*-*-* 06:00:00"
[slideshow]
restartinterval = "168h"
slideinterval = "300s"
# Album configuration (DO NOT CHANGE albums.root )
albums.root = "/tank/pictures"
albums.selected = ["/", "/KemoNine"]
``` ```

View File

@ -24,7 +24,7 @@ func LoadConfig(errFatalOnMissing bool) (*koanf.Koanf, *kfile.File) {
CONFIG_KEY_FAN_POLL_INTERVAL: DEFAULT_FAN_POLL_INTERVAL, CONFIG_KEY_FAN_POLL_INTERVAL: DEFAULT_FAN_POLL_INTERVAL,
CONFIG_KEY_FAN_SPEEDS: DEFAULT_FAN_SPEEDS, CONFIG_KEY_FAN_SPEEDS: DEFAULT_FAN_SPEEDS,
CONFIG_KEY_FAN_MIN_SPEED: DEFAULT_FAN_MIN_SPEED, CONFIG_KEY_FAN_MIN_SPEED: DEFAULT_FAN_MIN_SPEED,
}, ""), nil) }, "."), nil)
// Bring in /etc/defaults/pf.toml if it exists // Bring in /etc/defaults/pf.toml if it exists
configFileProvider := kfile.Provider(CONFIG_FILE_PATH) configFileProvider := kfile.Provider(CONFIG_FILE_PATH)