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
90 90
91 // Select anime to watch (Anilist) 91 // Select anime to watch (Anilist)
92 anilistSelectedOption, err := DynamicSelect(animeListMap) 92 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 }
93 userQuery := anilistSelectedOption.Label 99 userQuery := anilistSelectedOption.Label
94 anime.AnilistId, err = strconv.Atoi(anilistSelectedOption.Key) 100 anime.AnilistId, err = strconv.Atoi(anilistSelectedOption.Key)
95 if err != nil { 101 if err != nil {