Add method to get value of tag from a book.

Only the `getTagStr` method is available on android because we need a
proper exception handling on wrapping side.

Fix #298
This commit is contained in:
Matthieu Gautier committed 2020-01-30 17:48:56 +01:00
1 parent 7275f9b8e3
commit bc257d2d6d
4 files changed
+25

No files matched your search

+9
View File
@@ -23,6 +23,7 @@
#include "tools/base64.h"
#include "tools/regexTools.h"
#include "tools/networkTools.h"
#include "tools/otherTools.h"
#include <pugixml.hpp>
@@ -203,4 +204,12 @@ const std::string& Book::getFavicon() const {
return m_favicon;
}
std::string Book::getTagStr(const std::string& tagName) const {
return getTagValueFromTagList(convertTags(m_tags), tagName);
}
bool Book::getTagBool(const std::string& tagName) const {
return convertStrToBool(getTagStr(tagName));
}
}