diff --git a/config.go b/config.go index 6b683cc..01cd96c 100644 --- a/config.go +++ b/config.go @@ -14,7 +14,7 @@ var ( "ADDITIONAL_PADDING_Y": 16, "IMAGE_WIDTH_EXTRA_X": -1.5, "IMAGE_WIDTH_EXTRA_Y": -3.75, - "MUSIC_DIRECTORY": HOME_DIR + "/Music", + "MUSIC_DIRECTORY": getMusicDirectory(), "PORT": "6600", "DEFAULT_IMAGE_PATH": "default.jpg", "COVER_IMAGE_PATH": "cover.jpg", diff --git a/utils.go b/utils.go index e79ee39..1d558dc 100644 --- a/utils.go +++ b/utils.go @@ -94,6 +94,7 @@ func getMusicDirectory() string { for _, j := range maps { if strings.Contains(j, "music_directory") { s := strings.SplitAfter(strings.ReplaceAll(j, " ", ""), "y")[1] + s = strings.ReplaceAll(s, "\t", "") d := "" for z, m := range s { if (z != 0) && (z != (len(s) - 1)) {