Mercurial > minori
comparison src/core/anime_db.cc @ 326:10096c5489e3
anime/db: refactor anime_season_db out
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 13 Jun 2024 00:42:00 -0400 |
parents | 5d3c9b31aa6e |
children | b5d6c27c308f |
comparison
equal
deleted
inserted
replaced
325:78929794e7d8 | 326:10096c5489e3 |
---|---|
345 if (anime.IsInUserList()) | 345 if (anime.IsInUserList()) |
346 anime.RemoveFromUserList(); | 346 anime.RemoveFromUserList(); |
347 } | 347 } |
348 } | 348 } |
349 | 349 |
350 std::vector<int> Database::GetAllAnimeForSeason(SeriesSeason season, Date::Year year) { | |
351 std::vector<int> res; | |
352 | |
353 for (const auto& [id, anime] : items) { | |
354 if (anime.GetSeason() == season && anime.GetStartedDate().GetYear() == year) | |
355 res.push_back(id); | |
356 } | |
357 | |
358 return res; | |
359 } | |
360 | |
350 Database db; | 361 Database db; |
351 | 362 |
352 } // namespace Anime | 363 } // namespace Anime |