Mercurial > minori
diff src/services/kitsu.cc @ 325:78929794e7d8
pages/seasons: run seasons search in a separate thread
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 13 Jun 2024 00:36:41 -0400 |
parents | 5d3c9b31aa6e |
children | b5d6c27c308f |
line wrap: on
line diff
--- a/src/services/kitsu.cc Wed Jun 12 23:03:22 2024 -0400 +++ b/src/services/kitsu.cc Thu Jun 13 00:36:41 2024 -0400 @@ -299,10 +299,9 @@ if (attributes.contains("/startDate"_json_pointer) && attributes["/startDate"_json_pointer].is_string()) anime.SetStartedDate(attributes["/startDate"_json_pointer].get<std::string>()); - if (attributes.contains("/endDate"_json_pointer) && attributes["/endDate"_json_pointer].is_string()) - anime.SetCompletedDate(attributes["/endDate"_json_pointer].get<std::string>()); - else - anime.SetCompletedDate(anime.GetStartedDate()); + anime.SetCompletedDate(attributes.contains("/endDate"_json_pointer) && attributes["/endDate"_json_pointer].is_string() + ? attributes["/endDate"_json_pointer].get<std::string>() + : anime.GetStartedDate()); if (attributes.contains("/subtype"_json_pointer) && attributes["/subtype"_json_pointer].is_string()) ParseSubtype(anime, attributes["/subtype"_json_pointer].get<std::string>()); @@ -549,8 +548,8 @@ return {}; } -std::vector<int> GetSeason(Anime::SeriesSeason season, Date::Year year) { - return {}; +bool GetSeason(Anime::SeriesSeason season, Date::Year year) { + return false; } int UpdateAnimeEntry(int id) {