This commit is contained in:
jpirnay
2026-04-01 13:57:06 +02:00
parent c74d71771f
commit 19aa643079
2 changed files with 8 additions and 10 deletions
@@ -235,8 +235,7 @@ bool findProgressForXPathInternal(const std::shared_ptr<Epub>& epub, const int s
} }
if (state.targetTextNodeIndex > 0) { if (state.targetTextNodeIndex > 0) {
LOG_DBG("KOX", LOG_DBG("KOX", "Reverse: spine=%d %s match textNode=%d char=%d offset=%zu/%zu -> progress=%.3f for '%s'",
"Reverse: spine=%d %s match textNode=%d char=%d offset=%zu/%zu -> progress=%.3f for '%s'",
spineIndex, state.bestTierName, state.targetTextNodeIndex, state.targetCharOffset, state.bestOffset, spineIndex, state.bestTierName, state.targetTextNodeIndex, state.targetCharOffset, state.bestOffset,
state.totalTextBytes, outIntraSpineProgress, xpath.c_str()); state.totalTextBytes, outIntraSpineProgress, xpath.c_str());
} else { } else {
+7 -8
View File
@@ -188,15 +188,14 @@ CrossPointPosition ProgressMapper::toCrossPoint(const std::shared_ptr<Epub>& epu
} }
} }
LOG_DBG("ProgressMapper", "Resolved KOReader position: spine=%d intra=%.3f hasPIdx=%s pIdx=%u", LOG_DBG("ProgressMapper", "Resolved KOReader position: spine=%d intra=%.3f hasPIdx=%s pIdx=%u", result.spineIndex,
result.spineIndex, resolvedIntraSpineProgress, result.hasParagraphIndex ? "yes" : "no", resolvedIntraSpineProgress, result.hasParagraphIndex ? "yes" : "no", result.paragraphIndex);
result.paragraphIndex);
const char* mappingSource = usedXPathMapping ? (usedPercentageReconcile ? "xpath+percentage" : "xpath") const char* mappingSource =
: "percentage"; usedXPathMapping ? (usedPercentageReconcile ? "xpath+percentage" : "xpath") : "percentage";
LOG_DBG("ProgressMapper", "KOReader -> CrossPoint: %.2f%% at %s -> spine=%d, page=%d (%s, exact=%s)", LOG_DBG("ProgressMapper", "KOReader -> CrossPoint: %.2f%% at %s -> spine=%d, page=%d (%s, exact=%s)",
koPos.percentage * 100, koPos.xpath.c_str(), result.spineIndex, result.pageNumber, mappingSource, koPos.percentage * 100, koPos.xpath.c_str(), result.spineIndex, result.pageNumber, mappingSource,
xpathExactMatch ? "yes" : "no"); xpathExactMatch ? "yes" : "no");
return result; return result;
} }