simple fix #152651119 - change anime status from "TBA" and "Unreleased" into "Upcoming" when imported from Kitsu

This commit is contained in:
nallown 2017-11-11 03:58:14 +00:00
parent ee1b3f6edf
commit 0a807185f6

View File

@ -58,7 +58,13 @@ func sync(data *kitsu.Anime) *arn.Anime {
anime.EndDate = attr.EndDate anime.EndDate = attr.EndDate
anime.EpisodeCount = attr.EpisodeCount anime.EpisodeCount = attr.EpisodeCount
anime.EpisodeLength = attr.EpisodeLength anime.EpisodeLength = attr.EpisodeLength
anime.Status = attr.Status
if strings.EqualFold(attr.Status, "tba") || strings.EqualFold(attr.Status, "unreleased") {
anime.Status = "Upcoming"
} else {
anime.Status = attr.Status
}
anime.Summary = arn.FixAnimeDescription(attr.Synopsis) anime.Summary = arn.FixAnimeDescription(attr.Synopsis)
if anime.Mappings == nil { if anime.Mappings == nil {