Mercurial > minori
diff src/services/anilist.cc @ 184:09492158bcc5
anime: etc. comments and changes
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 04 Dec 2023 13:44:42 -0500 |
parents | 01d259b9c89f |
children | 62e336597bb7 |
line wrap: on
line diff
--- a/src/services/anilist.cc Mon Dec 04 13:40:42 2023 -0500 +++ b/src/services/anilist.cc Mon Dec 04 13:44:42 2023 -0500 @@ -253,9 +253,9 @@ * float score, * int scoreRaw, * int progress, - * int progressVolumes, - * int repeat, - * int priority, + * int progressVolumes, // manga-specific. + * int repeat, // rewatch + * int priority, * bool private, * string notes, * bool hiddenFromStatusLists, @@ -265,10 +265,13 @@ * Date completedAt **/ Anime::Anime& anime = Anime::db.items[id]; + if (!anime.IsInUserList()) + return 0; + constexpr std::string_view query = "mutation ($media_id: Int, $progress: Int, $status: MediaListStatus, $score: Int, " - "$notes: String, $start: FuzzyDateInput, $comp: FuzzyDateInput) {\n" + "$notes: String, $start: FuzzyDateInput, $comp: FuzzyDateInput, $repeat: Int) {\n" " SaveMediaListEntry (mediaId: $media_id, progress: $progress, status: $status, " - "scoreRaw: $score, notes: $notes, startedAt: $start, completedAt: $comp) {\n" + "scoreRaw: $score, notes: $notes, startedAt: $start, completedAt: $comp, repeat: $repeat) {\n" " id\n" " }\n" "}\n"; @@ -282,7 +285,8 @@ {"score", anime.GetUserScore()}, {"notes", anime.GetUserNotes()}, {"start", anime.GetUserDateStarted().GetAsAniListJson()}, - {"comp", anime.GetUserDateCompleted().GetAsAniListJson()} + {"comp", anime.GetUserDateCompleted().GetAsAniListJson()}, + {"repeat", anime.GetUserRewatchedTimes()} }} }; // clang-format on