Mercurial > minori
comparison src/core/anime_season_db.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 | dd211ff68b36 |
children |
comparison
equal
deleted
inserted
replaced
323:1686fac290c5 | 324:5d3c9b31aa6e |
---|---|
7 | 7 |
8 std::vector<int> GetAllAnimeForSeason(SeriesSeason season, Date::Year year) { | 8 std::vector<int> GetAllAnimeForSeason(SeriesSeason season, Date::Year year) { |
9 std::vector<int> ret; | 9 std::vector<int> ret; |
10 | 10 |
11 for (const auto& [id, anime] : db.items) { | 11 for (const auto& [id, anime] : db.items) { |
12 std::optional<Date::Year> anime_year = anime.GetAirDate().GetYear(); | 12 std::optional<Date::Year> anime_year = anime.GetStartedDate().GetYear(); |
13 if (anime.GetSeason() == season && anime_year && anime_year.value() == year) | 13 if (anime.GetSeason() == season && anime_year && anime_year.value() == year) |
14 ret.push_back(id); | 14 ret.push_back(id); |
15 } | 15 } |
16 | 16 |
17 return ret; | 17 return ret; |