Skip to content

Commit

Permalink
feat: show is adult in search link
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucca Pessoa committed Jan 3, 2022
1 parent 864eabb commit 4ab38d9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ Depending on what you are making, it can be a good idea to include screenshots o

## ➀ Links <a name = "links"></a>

* 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 <a name = "author"></a>

Expand Down
4 changes: 2 additions & 2 deletions internal/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/trace/search_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion internal/trace/search_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand All @@ -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))
}
}

0 comments on commit 4ab38d9

Please sign in to comment.