fixed some copy/paste errors

This commit is contained in:
Daniel Sommer 2023-11-23 17:08:06 +01:00
parent e5f60b7b87
commit 9e5b1aaf2d
2 changed files with 3 additions and 3 deletions

2
.vscode/launch.json vendored
View file

@ -10,7 +10,7 @@
"env":{
"SLIDESHOW_INTERVAL": "10",
"SLIDESHOW_DIRECTORY": "/home/velvettear/images",
"SLIDESHOW_SCANINTERVAL": "10",
"SLIDESHOW_SCANINTERVAL": "300",
"SLIDESHOW_RESOLUTION": "600x1024",
"SLIDESHOW_LOGLEVEL": "debug",
"SLIDESHOW_PALETTE": "/tmp/.slideshow.palette",

View file

@ -32,7 +32,7 @@ func GetRandomImage() string {
// scan the specified directory
func scan(directory string) {
timestamp := time.Now().UnixMilli()
loggo.Info("scanning directory for images and subdirectories...", directory)
loggo.Info("scanning directory for images and subdirectories...", "interval: "+strconv.FormatFloat(config.ScanInterval.Seconds(), 'f', 0, 64)+" seconds", directory)
filepath.WalkDir(directory, checkDirectory)
images = tmpImages
tmpImages = nil
@ -42,7 +42,7 @@ func scan(directory string) {
// sleep the specified interval and then trigger a rescan of the specified directory
func scheduleRescan(directory string) {
loggo.Debug("sleeping for " + strconv.FormatInt(config.Interval.Milliseconds(), 10) + "ms before next scan...")
loggo.Debug("sleeping for " + strconv.FormatInt(config.ScanInterval.Milliseconds(), 10) + "ms before next scan...")
time.Sleep(config.ScanInterval)
scan(directory)
}