mirror of https://github.com/kiwix/libkiwix.git
Fix getArticleCount.
With #403, the article mimetype may be different than "text/html". It can also be "text/html; raw=true". (And in fact it already could have any kind of optional argument).
This commit is contained in:
parent
87b5adcaf4
commit
a55d504017
|
@ -138,9 +138,10 @@ unsigned int Reader::getArticleCount() const
|
|||
if (counterMap.empty()) {
|
||||
counter = this->nsACount;
|
||||
} else {
|
||||
auto it = counterMap.find("text/html");
|
||||
if (it != counterMap.end()) {
|
||||
counter = it->second;
|
||||
for(auto &pair:counterMap) {
|
||||
if (startsWith(pair.first, "text/html")) {
|
||||
counter += pair.second;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue