Merge pull request #439 from kiwix/mediacount-video-audio

Support 'video/*' * 'audio/*' mimetypes in getMediaCount()
This commit is contained in:
Kelson 2021-01-08 13:01:42 +01:00 committed by GitHub
commit 9e032b6eea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -121,7 +121,9 @@ unsigned int Reader::getMediaCount() const
unsigned int counter = 0;
for (auto &pair:counterMap) {
if (startsWith(pair.first, "image/")) {
if (startsWith(pair.first, "image/") ||
startsWith(pair.first, "video/") ||
startsWith(pair.first, "audio/")) {
counter += pair.second;
}
}