Mercurial > minori
comparison src/core/anime_db.cc @ 413:192da585a0a8 default tip
*: fix formatting
the clang-format file was broken andjust using LLVM defaults.
now it's fixed and is more in line with what I actually prefer my
code to look like -- esp. with regards to tabulators
| author | Paper <paper@tflc.us> |
|---|---|
| date | Sat, 25 Jul 2026 14:54:32 -0400 |
| parents | a72d6d7b3568 |
| children |
comparison
equal
deleted
inserted
replaced
| 412:05aed03e0111 | 413:192da585a0a8 |
|---|---|
| 62 size_t total = 0; | 62 size_t total = 0; |
| 63 | 63 |
| 64 for (const auto &[id, anime] : items) | 64 for (const auto &[id, anime] : items) |
| 65 if (anime.IsInUserList()) | 65 if (anime.IsInUserList()) |
| 66 total += anime.GetDuration() * anime.GetUserProgress() + | 66 total += anime.GetDuration() * anime.GetUserProgress() + |
| 67 anime.GetEpisodes() * anime.GetDuration() * anime.GetUserRewatchedTimes(); | 67 anime.GetEpisodes() * anime.GetDuration() * anime.GetUserRewatchedTimes(); |
| 68 | 68 |
| 69 return total; | 69 return total; |
| 70 } | 70 } |
| 71 | 71 |
| 72 /* Returns the total planned amount in minutes. | 72 /* Returns the total planned amount in minutes. |
| 275 anime.SetTitle(lang, json[p].get<std::string>()); | 275 anime.SetTitle(lang, json[p].get<std::string>()); |
| 276 } | 276 } |
| 277 anime.SetTitleSynonyms(JSON::GetArray<std::vector<std::string>>(json, "/synonyms"_json_pointer, {})); | 277 anime.SetTitleSynonyms(JSON::GetArray<std::vector<std::string>>(json, "/synonyms"_json_pointer, {})); |
| 278 anime.SetEpisodes(JSON::GetNumber(json, "/episodes"_json_pointer, 0)); | 278 anime.SetEpisodes(JSON::GetNumber(json, "/episodes"_json_pointer, 0)); |
| 279 anime.SetAiringStatus( | 279 anime.SetAiringStatus( |
| 280 Translate::ToSeriesStatus(JSON::GetString<std::string>(json, "/airing_status"_json_pointer, ""))); | 280 Translate::ToSeriesStatus(JSON::GetString<std::string>(json, "/airing_status"_json_pointer, ""))); |
| 281 anime.SetStartedDate(Date(JSON::GetValue(json, "/started_date"_json_pointer))); | 281 anime.SetStartedDate(Date(JSON::GetValue(json, "/started_date"_json_pointer))); |
| 282 anime.SetCompletedDate(Date(JSON::GetValue(json, "/completed_date"_json_pointer))); | 282 anime.SetCompletedDate(Date(JSON::GetValue(json, "/completed_date"_json_pointer))); |
| 283 anime.SetGenres(JSON::GetArray<std::vector<std::string>>(json, "/genres"_json_pointer, {})); | 283 anime.SetGenres(JSON::GetArray<std::vector<std::string>>(json, "/genres"_json_pointer, {})); |
| 284 anime.SetProducers(JSON::GetArray<std::vector<std::string>>(json, "/producers"_json_pointer, {})); | 284 anime.SetProducers(JSON::GetArray<std::vector<std::string>>(json, "/producers"_json_pointer, {})); |
| 285 anime.SetFormat(Translate::ToSeriesFormat(JSON::GetString<std::string>(json, "/format"_json_pointer, ""))); | 285 anime.SetFormat(Translate::ToSeriesFormat(JSON::GetString<std::string>(json, "/format"_json_pointer, ""))); |
