Support for book category attribute in library.xml

This commit is contained in:
Veloman Yunkan
2021-03-13 00:54:06 +04:00
parent 6b2067c236
commit 4abc4f8518
2 changed files with 110 additions and 1 deletions

View File

@ -127,7 +127,8 @@ void Book::updateFromXml(const pugi::xml_node& node, const std::string& baseDir)
try {
m_downloadId = ATTR("downloadId");
} catch(...) {}
m_category = getCategoryFromTags();
const auto catattr = node.attribute("category");
m_category = catattr.empty() ? getCategoryFromTags() : catattr.value();
}
#undef ATTR