From b20ed57d3ca8a88c32ee0cb48bed339bce5915d6 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 15 Aug 2023 15:13:21 +0530 Subject: fixed errors due to mg --- ui/search.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ui') 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 }} `, -- cgit v1.2.3