From 4ab38d922462e8a7583fd5a007a55e0281bd90a6 Mon Sep 17 00:00:00 2001 From: Lucca Pessoa Date: Mon, 3 Jan 2022 18:23:28 -0300 Subject: [PATCH] feat: show is adult in search link --- README.md | 4 +++- internal/constants/constants.go | 4 ++-- internal/trace/search_file.go | 2 +- internal/trace/search_link.go | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9b04293..d228148 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,9 @@ Depending on what you are making, it can be a good idea to include screenshots o ## ➤ Links -* https://soruly.github.io/trace.moe-api/#/ +- https://soruly.github.io/trace.moe-api/#/ +- https://img.olhardigital.com.br/wp-content/uploads/2021/07/Naruto-Classico-e-Naruto-Shippuden-fillers.jpg +- https://images.plurk.com/32B15UXxymfSMwKGTObY5e.jpg ## ➤ Author diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 58cd69e..453380b 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -4,10 +4,10 @@ const ( // DefaultTimestampFormat default time format. DefaultTimestampFormat = "2006-01-02_15:04:05" - // TraceMoeSearchAnimeByFile default trace.moe URL + // TraceMoeSearchAnimeByFile default trace.moe URL for file TraceMoeSearchAnimeByFile = "https://api.trace.moe/search?anilistInfo" - // TraceMoeSearchAnimeByLink default trace.moe URL + // TraceMoeSearchAnimeByLink default trace.moe URL for link TraceMoeSearchAnimeByLink = "https://api.trace.moe/search?anilistInfo&url=" // TraceMoeUsage default trace.moe URL diff --git a/internal/trace/search_file.go b/internal/trace/search_file.go index b7ddae6..956893a 100644 --- a/internal/trace/search_file.go +++ b/internal/trace/search_file.go @@ -32,7 +32,7 @@ func SearchAnimeByFile(animeFile string, pretty bool) { defer termenv.ShowCursor() s := spinner.New(spinner.CharSets[39], 100*time.Millisecond) - s.Prefix = "🔎 Searching for the anime from an image: " + s.Prefix = "🌊 Searching for the anime from an image: " s.FinalMSG = color.GreenString("✔️ Found!\n\n") go catchInterrupt(s) diff --git a/internal/trace/search_link.go b/internal/trace/search_link.go index 1f3e7c1..e3e77fe 100644 --- a/internal/trace/search_link.go +++ b/internal/trace/search_link.go @@ -38,7 +38,7 @@ func SearchAnimeByLink(animeLink string, pretty bool) { defer termenv.ShowCursor() s := spinner.New(spinner.CharSets[39], 100*time.Millisecond) - s.Prefix = "🔎 Searching for the anime from a link: " + s.Prefix = "🌊 Searching for the anime from a link: " s.FinalMSG = color.GreenString("✔️ Found!\n\n") go catchInterrupt(s) @@ -80,6 +80,7 @@ func SearchAnimeByLink(animeLink string, pretty bool) { {"🗽 Title English", animeResp.Result[0].Anilist.Title.English}, {"🗻 Title Romaji", animeResp.Result[0].Anilist.Title.Romaji}, {"📺 Episode Number", color.MagentaString(strconv.Itoa(animeResp.Result[0].Episode))}, + {"😈 Is Adult", animeResp.Result[0].Anilist.IsAdult}, }) versionTable.SetStyle(table.StyleColoredBlueWhiteOnBlack) versionTable.Render() @@ -89,5 +90,6 @@ func SearchAnimeByLink(animeLink string, pretty bool) { fmt.Println("🗽 Title English: " + animeResp.Result[0].Anilist.Title.English) fmt.Println("🗻 Title Romaji: " + animeResp.Result[0].Anilist.Title.Romaji) fmt.Println("📺 Episode Number: " + color.MagentaString(strconv.Itoa(animeResp.Result[0].Episode))) + fmt.Println("😈 Is Adult: " + fmt.Sprintf("%v", animeResp.Result[0].Anilist.IsAdult)) } }