comparison src/gui/pages/anime_list.cc @ 197:c4ca035c565d

*: misc. patches
author Paper <mrpapersonic@gmail.com>
date Fri, 08 Dec 2023 11:19:54 -0500
parents 9613d72b097e
children bc1ae1810855
comparison
equal deleted inserted replaced
196:f0ff06a45c42 197:c4ca035c565d
113 return QString::number(list[index.row()].GetUserProgress()) + "/" + 113 return QString::number(list[index.row()].GetUserProgress()) + "/" +
114 QString::number(list[index.row()].GetEpisodes()); 114 QString::number(list[index.row()].GetEpisodes());
115 case AL_EPISODES: return list[index.row()].GetEpisodes(); 115 case AL_EPISODES: return list[index.row()].GetEpisodes();
116 case AL_SCORE: return Strings::ToQString(list[index.row()].GetUserPresentableScore()); 116 case AL_SCORE: return Strings::ToQString(list[index.row()].GetUserPresentableScore());
117 case AL_TYPE: return Strings::ToQString(Translate::ToString(list[index.row()].GetFormat())); 117 case AL_TYPE: return Strings::ToQString(Translate::ToString(list[index.row()].GetFormat()));
118 case AL_SEASON: 118 case AL_SEASON: {
119 return Strings::ToQString(Translate::ToString(list[index.row()].GetSeason())) + " " + 119 const std::optional<unsigned int> year = list[index.row()].GetAirDate().GetYear();
120 QString::number(list[index.row()].GetAirDate().GetYear()); 120 if (year.has_value())
121 return Strings::ToQString(Translate::ToString(list[index.row()].GetSeason()) + " " + std::to_string(year.value()));
122 }
121 case AL_AVG_SCORE: return QString::number(list[index.row()].GetAudienceScore()) + "%"; 123 case AL_AVG_SCORE: return QString::number(list[index.row()].GetAudienceScore()) + "%";
122 case AL_STARTED: return list[index.row()].GetUserDateStarted().GetAsQDate(); 124 case AL_STARTED: return list[index.row()].GetUserDateStarted().GetAsQDate();
123 case AL_COMPLETED: return list[index.row()].GetUserDateCompleted().GetAsQDate(); 125 case AL_COMPLETED: return list[index.row()].GetUserDateCompleted().GetAsQDate();
124 case AL_UPDATED: { 126 case AL_UPDATED: {
125 if (list[index.row()].GetUserTimeUpdated() == 0) 127 if (list[index.row()].GetUserTimeUpdated() == 0)