# HG changeset patch # User Paper # Date 1762518293 18000 # Node ID de10a647eb9b9d696da6d83bdb77aaee4860dff6 # Parent 963047512d34aac891b4330f5d18c6a5b66e3d02 kitsu: fix up clang-format's shitty json formatting diff -r 963047512d34 -r de10a647eb9b src/services/kitsu.cc --- a/src/services/kitsu.cc Fri Nov 07 07:16:15 2025 -0500 +++ b/src/services/kitsu.cc Fri Nov 07 07:24:53 2025 -0500 @@ -638,35 +638,38 @@ if (!anime.IsInUserList()) return 0; /* WTF */ + // clang-format off nlohmann::json json = { - {"data", - {{"type", "libraryEntries"}, - {"attributes", - { - {"status", UserStatusToString(anime.GetUserStatus())}, - {"progress", anime.GetUserProgress()}, - {"reconsuming", anime.GetUserIsRewatching()}, - {"reconsumeCount", anime.GetUserRewatchedTimes()}, - {"notes", anime.GetUserNotes()}, - {"private", anime.GetUserIsPrivate()}, - // WTF is reactionSkipped? - {"startedAt", anime.GetUserDateStarted().GetAsISO8601()}, - {"finishedAt", anime.GetUserDateCompleted().GetAsISO8601()}, - }}, - {"relationships", - {{"anime", - {{"data", - { - {"type", "anime"}, - {"id", anime.GetServiceId(Anime::Service::Kitsu)}, - }}}}, - {"user", - {{"data", - { - {"type", "users"}, - {"id", session.config.auth.kitsu.user_id}, - }}}}}}}} - }; + {"data", { + {"type", "libraryEntries"}, + {"attributes", { + {"status", UserStatusToString(anime.GetUserStatus())}, + {"progress", anime.GetUserProgress()}, + {"reconsuming", anime.GetUserIsRewatching()}, + {"reconsumeCount", anime.GetUserRewatchedTimes()}, + {"notes", anime.GetUserNotes()}, + {"private", anime.GetUserIsPrivate()}, + // WTF is reactionSkipped? + {"startedAt", anime.GetUserDateStarted().GetAsISO8601()}, + {"finishedAt", anime.GetUserDateCompleted().GetAsISO8601()}, + }}, + {"relationships", { + {"anime", { + {"data", { + {"type", "anime"}, + {"id", anime.GetServiceId(Anime::Service::Kitsu)}, + }} + }}, + {"user", { + {"data", { + {"type", "users"}, + {"id", session.config.auth.kitsu.user_id}, + }} + }} + }} + }} + }; + // clang-format on nlohmann::json &attributes = json["data"]["attributes"];