One more usage of Book::getLanguages()

`Book::getLanguages()` is used instead of `Book::getLanguage()` when
determining the set of languages for a collection of books.
This commit is contained in:
Veloman Yunkan 2023-03-06 15:41:01 +04:00 committed by Matthieu Gautier
parent 51fcb90dc0
commit 2550306052
1 changed files with 2 additions and 1 deletions

View File

@ -223,7 +223,8 @@ typedef std::set<std::string> Languages;
Languages getLanguages(const Library& lib, const Library::BookIdSet& bookIds) {
Languages langs;
for ( const auto& b : bookIds ) {
langs.insert(lib.getBookById(b).getLanguage());
const auto bookLangs = lib.getBookById(b).getLanguages();
langs.insert(bookLangs.begin(), bookLangs.end());
}
return langs;
}