From 0aa4af528fd8dcf84d0f1c63414d4b868bc824a4 Mon Sep 17 00:00:00 2001 From: Wraient Date: Sat, 26 Oct 2024 23:09:55 +0530 Subject: [PATCH] Add mpv.exe using Git LFS --- .gitattributes | 1 + Build/mpv.exe | 3 +++ cmd/curd/main.go | 1 - internal/curd.go | 13 ++++++++++--- 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .gitattributes create mode 100755 Build/mpv.exe diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..60a189d --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +Build/mpv.exe filter=lfs diff=lfs merge=lfs -text diff --git a/Build/mpv.exe b/Build/mpv.exe new file mode 100755 index 0000000..eec842c --- /dev/null +++ b/Build/mpv.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4db25fddea3c6ad255743295ef90391e1e9c504281e0bc7b46f9703a89a28954 +size 112778752 diff --git a/cmd/curd/main.go b/cmd/curd/main.go index 4c1b840..886e6ba 100644 --- a/cmd/curd/main.go +++ b/cmd/curd/main.go @@ -363,7 +363,6 @@ func main() { if err != nil { internal.Log("Failed to mpv speed"+err.Error(), logFile) } - } time.Sleep(1 * time.Second) // Wait before checking again diff --git a/internal/curd.go b/internal/curd.go index 66532ff..7c5a1b2 100644 --- a/internal/curd.go +++ b/internal/curd.go @@ -114,9 +114,16 @@ func ExitCurd(err error) { RestoreScreen() if err != nil { fmt.Println(err) - os.Exit(1) + if runtime.GOOS == "windows" { + fmt.Println("Press Enter to exit") + var wait string + fmt.Scanln(&wait) + os.Exit(1) + } else { + fmt.Println("Have a great day!") + os.Exit(1) + } } - fmt.Println("Have a great day!") os.Exit(0) } @@ -267,7 +274,7 @@ func SetupCurd(userCurdConfig *CurdConfig, anime *Anime, user *User, databaseAni if anilistSelectedOption.Label == "add_new" { AddNewAnime(userCurdConfig, anime, user, databaseAnimes, logFile) } - + userQuery = anilistSelectedOption.Label anime.AnilistId, err = strconv.Atoi(anilistSelectedOption.Key) if err != nil {