diff src/services/anilist.cpp @ 66:6481c5aed3e1

posters: add poster widget... why does AniList call these cover images? they're posters...
author Paper <mrpapersonic@gmail.com>
date Mon, 02 Oct 2023 05:56:32 -0400
parents 26721c28bf22
children 64e5f427c6a2
line wrap: on
line diff
--- a/src/services/anilist.cpp	Sun Oct 01 23:26:35 2023 -0400
+++ b/src/services/anilist.cpp	Mon Oct 02 05:56:32 2023 -0400
@@ -157,6 +157,8 @@
 
 	anime.SetAirDate(ParseDate(json["/startDate"_json_pointer]));
 
+	anime.SetPosterUrl(JSON::GetString(json, "/coverImage/large"_json_pointer));
+
 	anime.SetAudienceScore(JSON::GetInt(json, "/averageScore"_json_pointer));
 	anime.SetSeason(Translate::AniList::ToSeriesSeason(JSON::GetString(json, "/season"_json_pointer)));
 	anime.SetDuration(JSON::GetInt(json, "/duration"_json_pointer));
@@ -219,6 +221,9 @@
 	                          "        }\n"
 	                          "        updatedAt\n"
 	                          "        media {\n"
+	                          "          coverImage {\n"
+	                          "            large\n"
+	                          "          }\n"
 	                          "          id\n"
 	                          "          title {\n"
 	                          "            romaji\n"