comparison src/gui/pages/search.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 8d45d892be88
comparison
equal deleted inserted replaced
326:10096c5489e3 327:b5d6c27c308f
124 switch (index.column()) { 124 switch (index.column()) {
125 case SR_TITLE: return Strings::ToQString(anime.GetUserPreferredTitle()); 125 case SR_TITLE: return Strings::ToQString(anime.GetUserPreferredTitle());
126 case SR_TYPE: return Strings::ToQString(Translate::ToLocalString(anime.GetFormat())); 126 case SR_TYPE: return Strings::ToQString(Translate::ToLocalString(anime.GetFormat()));
127 case SR_EPISODES: return anime.GetEpisodes(); 127 case SR_EPISODES: return anime.GetEpisodes();
128 case SR_SCORE: return QString::number(anime.GetAudienceScore()) + "%"; 128 case SR_SCORE: return QString::number(anime.GetAudienceScore()) + "%";
129 case SR_SEASON: 129 case SR_SEASON: return Strings::ToQString(Translate::ToLocalString(anime.GetSeason()));
130 return Strings::ToQString(Translate::ToLocalString(anime.GetSeason())) + " " +
131 QString::number(anime.GetStartedDate().GetYear().value_or(2000));
132 default: return {}; 130 default: return {};
133 } 131 }
134 break; 132 break;
135 case Qt::UserRole: 133 case Qt::UserRole:
136 switch (index.column()) { 134 switch (index.column()) {