add gamelist location as a parameter

This commit is contained in:
2026-01-07 20:35:48 +01:00
parent 79d9d300cb
commit 42a1080981
2 changed files with 16 additions and 10 deletions

View File

@@ -6,10 +6,11 @@ import (
)
type Config struct {
GameListLocation string
}
func Scan(files []string, config Config) {
gameList, err := loadGamelist("./ps2-gameslist.txt")
gameList, err := loadGamelist(config.GameListLocation)
if err != nil {
fmt.Printf("Failed to load game list: %v", err)
os.Exit(1)
@@ -31,7 +32,7 @@ func Scan(files []string, config Config) {
}
func Rename(files []string, config Config) {
gameList, err := loadGamelist("./ps2-gameslist.txt")
gameList, err := loadGamelist(config.GameListLocation)
if err != nil {
fmt.Printf("Failed to load game list: %v", err)
os.Exit(1)