fix: Fixed book title in home screen (#1013)
## Summary * **What is the goal of this PR?** (e.g., Implements the new feature for file uploading.) * The goal is to fix the title of books in the Home Screen. Before  After:  * **What changes are included?** ## Additional Context * Add any other information that might be helpful for the reviewer (e.g., performance implications, potential risks, specific areas to focus on). --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? YES, Cursor
This commit is contained in:
committed by
Dave Allie
parent
e44c004be6
commit
498e087a68
@@ -102,7 +102,10 @@ void XMLCALL ContentOpfParser::startElement(void* userData, const XML_Char* name
|
||||
}
|
||||
|
||||
if (self->state == IN_METADATA && strcmp(name, "dc:title") == 0) {
|
||||
self->state = IN_BOOK_TITLE;
|
||||
// Only capture the first dc:title element; subsequent ones are subtitles
|
||||
if (self->title.empty()) {
|
||||
self->state = IN_BOOK_TITLE;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user