Commit dcc3028f34

dcc3028f347d1722e316b3a6ae18162f605f636b

parent: fa00b9f8e6

Unsigned

Wraient <wraient.911@gmail.com> · 2024-10-22 11:23 UTC

Add: Graceful quit

Layout: unified · split

internal/curd.go +6
@@ -90,6 +90,12 @@ func SetupCurd(userCurdConfig *CurdConfig, anime *Anime, user *User, databaseAni
9090
9191 // Select anime to watch (Anilist)
9292 anilistSelectedOption, err := DynamicSelect(animeListMap)
93 if anilistSelectedOption.Key == "-1" || anilistSelectedOption.Label == "quit" {
94 os.Exit(0)
95 }
96 if anilistSelectedOption.Label == "add_new" { // Todo: Add new anime
97 os.Exit(0)
98 }
9399 userQuery := anilistSelectedOption.Label
94100 anime.AnilistId, err = strconv.Atoi(anilistSelectedOption.Key)
95101 if err != nil {