Mercurial > minori
comparison src/services/anilist.cc @ 260:dd211ff68b36
pages/seasons: add initial functionality
the menu doesn't work yet, but it's a good start
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 03 Apr 2024 19:48:38 -0400 |
parents | 862d0d8619f6 |
children | 657fda1b9cac |
comparison
equal
deleted
inserted
replaced
259:0362f3c4534c | 260:dd211ff68b36 |
---|---|
136 anime.SetPosterUrl(JSON::GetString<std::string>(json, "/coverImage/large"_json_pointer, "")); | 136 anime.SetPosterUrl(JSON::GetString<std::string>(json, "/coverImage/large"_json_pointer, "")); |
137 | 137 |
138 anime.SetAudienceScore(JSON::GetNumber(json, "/averageScore"_json_pointer, 0)); | 138 anime.SetAudienceScore(JSON::GetNumber(json, "/averageScore"_json_pointer, 0)); |
139 anime.SetSeason(Translate::AniList::ToSeriesSeason(JSON::GetString<std::string>(json, "/season"_json_pointer, ""))); | 139 anime.SetSeason(Translate::AniList::ToSeriesSeason(JSON::GetString<std::string>(json, "/season"_json_pointer, ""))); |
140 anime.SetDuration(JSON::GetNumber(json, "/duration"_json_pointer, 0)); | 140 anime.SetDuration(JSON::GetNumber(json, "/duration"_json_pointer, 0)); |
141 anime.SetSynopsis(Strings::TextifySynopsis(JSON::GetString<std::string>(json, "/description"_json_pointer, ""))); | 141 |
142 std::string synopsis = JSON::GetString<std::string>(json, "/description"_json_pointer, ""); | |
143 Strings::TextifySynopsis(synopsis); | |
144 anime.SetSynopsis(synopsis); | |
142 | 145 |
143 anime.SetGenres(JSON::GetArray<std::vector<std::string>>(json, "/genres"_json_pointer, {})); | 146 anime.SetGenres(JSON::GetArray<std::vector<std::string>>(json, "/genres"_json_pointer, {})); |
144 anime.SetTitleSynonyms(JSON::GetArray<std::vector<std::string>>(json, "/synonyms"_json_pointer, {})); | 147 anime.SetTitleSynonyms(JSON::GetArray<std::vector<std::string>>(json, "/synonyms"_json_pointer, {})); |
145 | 148 |
146 return id; | 149 return id; |