Mercurial > minori
comparison src/services/kitsu.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 | 8141f409d52c |
children | 78929794e7d8 |
comparison
equal
deleted
inserted
replaced
323:1686fac290c5 | 324:5d3c9b31aa6e |
---|---|
295 | 295 |
296 if (attributes.contains("/averageRating"_json_pointer) && attributes["/averageRating"_json_pointer].is_string()) | 296 if (attributes.contains("/averageRating"_json_pointer) && attributes["/averageRating"_json_pointer].is_string()) |
297 anime.SetAudienceScore(Strings::ToInt<double>(attributes["/averageRating"_json_pointer].get<std::string>())); | 297 anime.SetAudienceScore(Strings::ToInt<double>(attributes["/averageRating"_json_pointer].get<std::string>())); |
298 | 298 |
299 if (attributes.contains("/startDate"_json_pointer) && attributes["/startDate"_json_pointer].is_string()) | 299 if (attributes.contains("/startDate"_json_pointer) && attributes["/startDate"_json_pointer].is_string()) |
300 anime.SetAirDate(attributes["/startDate"_json_pointer].get<std::string>()); | 300 anime.SetStartedDate(attributes["/startDate"_json_pointer].get<std::string>()); |
301 | 301 |
302 // XXX endDate | 302 if (attributes.contains("/endDate"_json_pointer) && attributes["/endDate"_json_pointer].is_string()) |
303 anime.SetCompletedDate(attributes["/endDate"_json_pointer].get<std::string>()); | |
304 else | |
305 anime.SetCompletedDate(anime.GetStartedDate()); | |
303 | 306 |
304 if (attributes.contains("/subtype"_json_pointer) && attributes["/subtype"_json_pointer].is_string()) | 307 if (attributes.contains("/subtype"_json_pointer) && attributes["/subtype"_json_pointer].is_string()) |
305 ParseSubtype(anime, attributes["/subtype"_json_pointer].get<std::string>()); | 308 ParseSubtype(anime, attributes["/subtype"_json_pointer].get<std::string>()); |
306 | 309 |
307 if (attributes.contains("/status"_json_pointer) && attributes["/status"_json_pointer].is_string()) | 310 if (attributes.contains("/status"_json_pointer) && attributes["/status"_json_pointer].is_string()) |