Mercurial > minori
comparison src/core/anime.cc @ 327:b5d6c27c308f
anime: refactor Anime::SeriesSeason to Season class
ToLocalString has also been altered to take in both season
and year because lots of locales actually treat formatting
seasons differently! most notably is Russian which adds a
suffix at the end to notate seasons(??)
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 13 Jun 2024 01:49:18 -0400 |
parents | 5d3c9b31aa6e |
children |
comparison
equal
deleted
inserted
replaced
326:10096c5489e3 | 327:b5d6c27c308f |
---|---|
242 | 242 |
243 SeriesFormat Anime::GetFormat() const { | 243 SeriesFormat Anime::GetFormat() const { |
244 return info_.format; | 244 return info_.format; |
245 } | 245 } |
246 | 246 |
247 SeriesSeason Anime::GetSeason() const { | 247 Season Anime::GetSeason() const { |
248 std::optional<Date::Month> month = info_.started.GetMonth(); | 248 return Season(info_.started); |
249 return (month.has_value() ? GetSeasonForMonth(month.value()) : SeriesSeason::Unknown); | |
250 } | 249 } |
251 | 250 |
252 double Anime::GetAudienceScore() const { | 251 double Anime::GetAudienceScore() const { |
253 return info_.audience_score; | 252 return info_.audience_score; |
254 } | 253 } |