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