comparison src/core/anime_db.cpp @ 10:4b198a111713

Update things actually compile now btw qttest wants to fuck over the model but that might be my fault so /shrug
author Paper <mrpapersonic@gmail.com>
date Sat, 16 Sep 2023 02:06:01 -0400
parents 5c0397762b53
children fc1bf97c528b
comparison
equal deleted inserted replaced
9:5c0397762b53 10:4b198a111713
5 5
6 int Database::GetTotalAnimeAmount() { 6 int Database::GetTotalAnimeAmount() {
7 int total = 0; 7 int total = 0;
8 for (const auto& [id, anime] : items) { 8 for (const auto& [id, anime] : items) {
9 if (anime.IsInUserList()) 9 if (anime.IsInUserList())
10 total++;
11 }
12 return total;
13 }
14
15 int Database::GetListsAnimeAmount(ListStatus status) {
16 if (status == ListStatus::NOT_IN_LIST)
17 return 0;
18 int total = 0;
19 for (const auto& [id, anime] : items) {
20 if (anime.IsInUserList() && anime.GetUserStatus() == status)
10 total++; 21 total++;
11 } 22 }
12 return total; 23 return total;
13 } 24 }
14 25