diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-15 15:13:21 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-15 15:13:21 +0530 |
commit | b20ed57d3ca8a88c32ee0cb48bed339bce5915d6 (patch) | |
tree | 6e3a4b5f7d7a1c1afe62b9b79248cd9c68f63237 /ui | |
parent | fff3dadabc321871e6819392efc605c6dffe2e69 (diff) |
fixed errors due to mg
Diffstat (limited to 'ui')
-rw-r--r-- | ui/search.go | 8 |
1 files changed, 4 insertions, 4 deletions
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 }} `, |