Mercurial > minori
comparison src/gui/pages/search.cc @ 324:5d3c9b31aa6e
anime: add completed date member
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 12 Jun 2024 23:03:22 -0400 |
parents | 91ac90a34003 |
children | b5d6c27c308f |
comparison
equal
deleted
inserted
replaced
323:1686fac290c5 | 324:5d3c9b31aa6e |
---|---|
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: |
130 return Strings::ToQString(Translate::ToLocalString(anime.GetSeason())) + " " + | 130 return Strings::ToQString(Translate::ToLocalString(anime.GetSeason())) + " " + |
131 QString::number(anime.GetAirDate().GetYear().value_or(2000)); | 131 QString::number(anime.GetStartedDate().GetYear().value_or(2000)); |
132 default: return {}; | 132 default: return {}; |
133 } | 133 } |
134 break; | 134 break; |
135 case Qt::UserRole: | 135 case Qt::UserRole: |
136 switch (index.column()) { | 136 switch (index.column()) { |
137 case SR_SCORE: return anime.GetAudienceScore(); | 137 case SR_SCORE: return anime.GetAudienceScore(); |
138 case SR_EPISODES: return anime.GetEpisodes(); | 138 case SR_EPISODES: return anime.GetEpisodes(); |
139 case SR_SEASON: return anime.GetAirDate().GetAsQDate(); | 139 case SR_SEASON: return anime.GetStartedDate().GetAsQDate(); |
140 /* We have to use this to work around some stupid | 140 /* We have to use this to work around some stupid |
141 * "conversion ambiguous" error on Linux | 141 * "conversion ambiguous" error on Linux |
142 */ | 142 */ |
143 default: return data(index, Qt::DisplayRole); | 143 default: return data(index, Qt::DisplayRole); |
144 } | 144 } |