diff options
-rw-r--r-- | cmd/root.go | 2 | ||||
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 4 | ||||
-rw-r--r-- | mal/list.go | 2 | ||||
-rw-r--r-- | mal/seasonals.go | 2 | ||||
-rw-r--r-- | ui/search.go | 8 |
6 files changed, 10 insertions, 10 deletions
diff --git a/cmd/root.go b/cmd/root.go index 5edcd60..0ba8965 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -34,7 +34,7 @@ var ( var rootCmd = &cobra.Command{ Use: "macli", - Version: "v1.20.0" + " " + runtime.GOOS + "/" + runtime.GOARCH, + Version: "v1.20.1" + " " + runtime.GOOS + "/" + runtime.GOARCH, Short: "macli - Unofficial CLI-Based MyAnimeList Client.", Long: "macli is an unofficial MyAnimeClient for use inside the terminal.\n" + @@ -9,7 +9,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.16.0 github.com/zalando/go-keyring v0.2.3 - vidhukant.com/mg v0.0.1 + vidhukant.com/mg v0.0.4 ) require ( @@ -514,5 +514,5 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -vidhukant.com/mg v0.0.1 h1:XaYxh1X9n1exNZ2gQSa/34e1vaz0NyPMdUpVxH44tY8= -vidhukant.com/mg v0.0.1/go.mod h1:2Iqo+jgEE8hINUNL1AoFrcs8UWCzuPelx/8lEPIUtqE= +vidhukant.com/mg v0.0.4 h1:vrI8sAQ7uQTNrDne2uM5M3kmAE4JVBc1B+9JfzgKgyU= +vidhukant.com/mg v0.0.4/go.mod h1:2Iqo+jgEE8hINUNL1AoFrcs8UWCzuPelx/8lEPIUtqE= diff --git a/mal/list.go b/mal/list.go index f00edd9..0430dc7 100644 --- a/mal/list.go +++ b/mal/list.go @@ -46,7 +46,7 @@ func AnimeList(user, status, sort string) []mg.Anime { } // TODO: return all the list items using loop -func MangaList(user, status, sort string) []m.Manga { +func MangaList(user, status, sort string) []mg.Manga { var res []mg.Manga _, err := MALClient.GetMangaList(&res, &mg.ListParams{ Username: user, diff --git a/mal/seasonals.go b/mal/seasonals.go index 29cfea6..d2cb420 100644 --- a/mal/seasonals.go +++ b/mal/seasonals.go @@ -25,7 +25,7 @@ import ( "strconv" ) -func GetSeasonalAnime(season a.Season, sort string) []mg.Anime { +func GetSeasonalAnime(season mg.Season, sort string) []mg.Anime { var res []mg.Anime err := MALClient.GetSeasonalAnime(&res, &mg.SeasonalParams{ Year: strconv.Itoa(season.Year), diff --git a/ui/search.go b/ui/search.go index e492e05..9c077aa 100644 --- a/ui/search.go +++ b/ui/search.go @@ -82,7 +82,7 @@ func AnimeSearch(label, searchString string) mg.Anime { } var ratingFormatted string - switch anime.Rating { + switch anime.ParentalRating { case "g": ratingFormatted = "G - All Ages" case "pg": @@ -96,9 +96,9 @@ func AnimeSearch(label, searchString string) mg.Anime { case "rx": ratingFormatted = "Rx - Hentai" default: - ratingFormatted = anime.Rating + ratingFormatted = anime.ParentalRating } - animes[i].Rating = ratingFormatted + animes[i].ParentalRating = ratingFormatted } template := &p.SelectTemplates { @@ -117,7 +117,7 @@ func AnimeSearch(label, searchString string) mg.Anime { {{ "Type:" | blue | bold }} {{ .MediaType }} {{ "Status:" | blue | bold }} {{ .Status }} {{ "Average Duration:" | blue | bold }} {{ if .DurationSeconds }}{{ .DurationSeconds }} minutes{{ else }}{{ "unknown" | faint }}{{ end }} -{{ "Rating:" | blue | bold }} {{ if .Rating }}{{ .Rating }}{{ else }}{{ "unknown" | faint }}{{ end }} +{{ "Parental Rating:" | blue | bold }} {{ if .ParentalRating }}{{ .ParentalRating }}{{ else }}{{ "unknown" | faint }}{{ end }} {{ "Studios:" | blue | bold }} {{ if .Studios }}{{ range .Studios }}{{ .Name }}{{ end }}{{ else }}{{ "unknown" | faint }}{{ end }} {{ "Genres:" | blue | bold }} {{ if .Genres }}{{ range .Genres }}{{ .Name }}{{ end }}{{ else }}{{ "unknown" | faint }}{{ end }} `, |