diff src/core/anime_db.cc @ 389:1e5d922fe82b

kitsu: implement UpdateAnimeEntry yay... i guess
author Paper <paper@tflc.us>
date Thu, 06 Nov 2025 12:21:35 -0500
parents 27c462bc7815
children a72d6d7b3568
line wrap: on
line diff
--- a/src/core/anime_db.cc	Thu Nov 06 09:53:06 2025 -0500
+++ b/src/core/anime_db.cc	Thu Nov 06 12:21:35 2025 -0500
@@ -146,6 +146,7 @@
 
 	// clang-format off
 	json = {
+		{"id", anime.GetUserId()},
 		{"status", Translate::ToString(anime.GetUserStatus())},
 		{"progress", anime.GetUserProgress()},
 		{"score", anime.GetUserScore()},
@@ -236,6 +237,7 @@
 	if (!anime.IsInUserList())
 		anime.AddToUserList();
 
+	anime.SetUserId(JSON::GetString<std::string>(json, "/id"_json_pointer, ""));
 	anime.SetUserStatus(Translate::ToListStatus(JSON::GetString<std::string>(json, "/status"_json_pointer, "")));
 	anime.SetUserProgress(JSON::GetNumber(json, "/progress"_json_pointer, 0));
 	anime.SetUserScore(JSON::GetNumber(json, "/score"_json_pointer, 0));