1
0

configurable input directory

This commit is contained in:
2022-05-01 09:48:37 +02:00
parent e889f5d515
commit b0e7cbbd2f
3 changed files with 3 additions and 1 deletions

2
fs.go
View File

@ -53,7 +53,7 @@ func getImagesList(path string) []string {
// Randomly choose x number of image from a given folder
func getRandomImage() string {
rand.Seed(time.Now().UnixNano())
dir := getImagesList("/home/gator/Photos/")
dir := getImagesList(ConfigRegister.InputDir)
index := rand.Intn(len(dir))
return dir[index]
}