diff src/gui/pages/anime_list.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 886f66775f31
line wrap: on
line diff
--- a/src/gui/pages/anime_list.cc	Thu Jun 13 00:42:00 2024 -0400
+++ b/src/gui/pages/anime_list.cc	Thu Jun 13 01:49:18 2024 -0400
@@ -142,13 +142,7 @@
 				case AL_EPISODES: return list[index.row()].GetEpisodes();
 				case AL_SCORE: return Strings::ToQString(list[index.row()].GetUserPresentableScore());
 				case AL_TYPE: return Strings::ToQString(Translate::ToString(list[index.row()].GetFormat()));
-				case AL_SEASON: {
-					std::optional<unsigned int> year = list[index.row()].GetStartedDate().GetYear();
-					if (!year)
-						return tr("Unknown Unknown");
-					return Strings::ToQString(Translate::ToLocalString(list[index.row()].GetSeason()) + " " +
-											  Strings::ToUtf8String(year.value()));
-				}
+				case AL_SEASON: return Strings::ToQString(Translate::ToLocalString(list[index.row()].GetSeason()));
 				case AL_AVG_SCORE: return QString::number(list[index.row()].GetAudienceScore()) + "%";
 				case AL_STARTED: return list[index.row()].GetUserDateStarted().GetAsQDate();
 				case AL_COMPLETED: return list[index.row()].GetUserDateCompleted().GetAsQDate();