Skip to content

Commit

Permalink
Merge pull request #439 from kiwix/mediacount-video-audio
Browse files Browse the repository at this point in the history
Support 'video/*' * 'audio/*' mimetypes in getMediaCount()
  • Loading branch information
kelson42 authored Jan 8, 2021
2 parents 18afa97 + 3e2810d commit 9e032b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 9e032b6

Please sign in to comment.