Mercurial > minori
comparison src/core/anime_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 | 1b5c04268d6a |
children | 10096c5489e3 |
comparison
equal
deleted
inserted
replaced
323:1686fac290c5 | 324:5d3c9b31aa6e |
---|---|
157 json = { | 157 json = { |
158 {"id", anime.GetId()}, | 158 {"id", anime.GetId()}, |
159 {"synonyms", anime.GetTitleSynonyms()}, | 159 {"synonyms", anime.GetTitleSynonyms()}, |
160 {"episodes", anime.GetEpisodes()}, | 160 {"episodes", anime.GetEpisodes()}, |
161 {"airing_status", Translate::ToString(anime.GetAiringStatus())}, | 161 {"airing_status", Translate::ToString(anime.GetAiringStatus())}, |
162 {"air_date", anime.GetAirDate().GetAsAniListJson()}, | 162 {"started_date", anime.GetStartedDate().GetAsAniListJson()}, |
163 {"completed_date", anime.GetCompletedDate().GetAsAniListJson()}, | |
163 {"genres", anime.GetGenres()}, | 164 {"genres", anime.GetGenres()}, |
164 {"producers", anime.GetProducers()}, | 165 {"producers", anime.GetProducers()}, |
165 {"format", Translate::ToString(anime.GetFormat())}, | 166 {"format", Translate::ToString(anime.GetFormat())}, |
166 // {"season", Translate::ToString(anime.GetSeason())}, | 167 // {"season", Translate::ToString(anime.GetSeason())}, |
167 {"audience_score", anime.GetAudienceScore()}, | 168 {"audience_score", anime.GetAudienceScore()}, |
258 } | 259 } |
259 anime.SetTitleSynonyms(JSON::GetArray<std::vector<std::string>>(json, "/synonyms"_json_pointer, {})); | 260 anime.SetTitleSynonyms(JSON::GetArray<std::vector<std::string>>(json, "/synonyms"_json_pointer, {})); |
260 anime.SetEpisodes(JSON::GetNumber(json, "/episodes"_json_pointer, 0)); | 261 anime.SetEpisodes(JSON::GetNumber(json, "/episodes"_json_pointer, 0)); |
261 anime.SetAiringStatus( | 262 anime.SetAiringStatus( |
262 Translate::ToSeriesStatus(JSON::GetString<std::string>(json, "/airing_status"_json_pointer, ""))); | 263 Translate::ToSeriesStatus(JSON::GetString<std::string>(json, "/airing_status"_json_pointer, ""))); |
263 anime.SetAirDate(Date(JSON::GetValue(json, "/air_date"_json_pointer))); | 264 anime.SetStartedDate(Date(JSON::GetValue(json, "/started_date"_json_pointer))); |
265 anime.SetCompletedDate(Date(JSON::GetValue(json, "/completed_date"_json_pointer))); | |
264 anime.SetGenres(JSON::GetArray<std::vector<std::string>>(json, "/genres"_json_pointer, {})); | 266 anime.SetGenres(JSON::GetArray<std::vector<std::string>>(json, "/genres"_json_pointer, {})); |
265 anime.SetProducers(JSON::GetArray<std::vector<std::string>>(json, "/producers"_json_pointer, {})); | 267 anime.SetProducers(JSON::GetArray<std::vector<std::string>>(json, "/producers"_json_pointer, {})); |
266 anime.SetFormat(Translate::ToSeriesFormat(JSON::GetString<std::string>(json, "/format"_json_pointer, ""))); | 268 anime.SetFormat(Translate::ToSeriesFormat(JSON::GetString<std::string>(json, "/format"_json_pointer, ""))); |
267 // anime.SetSeason(Translate::ToSeriesSeason(JSON::GetString<std::string>(json, "/season"_json_pointer, ""))); | 269 // anime.SetSeason(Translate::ToSeriesSeason(JSON::GetString<std::string>(json, "/season"_json_pointer, ""))); |
268 anime.SetAudienceScore(JSON::GetNumber(json, "/audience_score"_json_pointer, 0)); | 270 anime.SetAudienceScore(JSON::GetNumber(json, "/audience_score"_json_pointer, 0)); |