Commit c147c5ae7e
Unsigned
Layout: unified · split
cmd/curd/main.go +5 −5
| @@ -16,16 +16,13 @@ func main() { | |||
| 16 | discordClientId := "1287457464148820089" | 16 | discordClientId := "1287457464148820089" |
| 17 | 17 | ||
| 18 | // Setup | 18 | // Setup |
| 19 | 19 | internal.ClearScreen() | |
| 20 | // internal.ClearScreen() | 20 | defer internal.RestoreScreen() |
| 21 | // defer internal.RestoreScreen() | ||
| 22 | 21 | ||
| 23 | var anime internal.Anime | 22 | var anime internal.Anime |
| 24 | var user internal.User | 23 | var user internal.User |
| 25 | 24 | ||
| 26 | configFilePath := os.ExpandEnv("$HOME/.config/curd/curd.conf") | 25 | configFilePath := os.ExpandEnv("$HOME/.config/curd/curd.conf") |
| 27 | logFile := "debug.log" | ||
| 28 | internal.ClearLogFile(logFile) | ||
| 29 | 26 | ||
| 30 | // load curd userCurdConfig | 27 | // load curd userCurdConfig |
| 31 | userCurdConfig, err := internal.LoadConfig(configFilePath) | 28 | userCurdConfig, err := internal.LoadConfig(configFilePath) |
| @@ -34,6 +31,9 @@ func main() { | |||
| 34 | return | 31 | return |
| 35 | } | 32 | } |
| 36 | 33 | ||
| 34 | logFile := filepath.Join(os.ExpandEnv(userCurdConfig.StoragePath), "debug.log") | ||
| 35 | internal.ClearLogFile(logFile) | ||
| 36 | |||
| 37 | // Flags configured here cause userconfig needs to be changed. | 37 | // Flags configured here cause userconfig needs to be changed. |
| 38 | flag.StringVar(&userCurdConfig.Player, "player", userCurdConfig.Player, "Player to use for playback (Only mpv supported currently)") | 38 | flag.StringVar(&userCurdConfig.Player, "player", userCurdConfig.Player, "Player to use for playback (Only mpv supported currently)") |
| 39 | flag.StringVar(&userCurdConfig.StoragePath, "storage-path", userCurdConfig.StoragePath, "Path to the storage directory") | 39 | flag.StringVar(&userCurdConfig.StoragePath, "storage-path", userCurdConfig.StoragePath, "Path to the storage directory") |