mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-08 08:37:38 +03:00
Compare commits
No commits in common. "940f6a3313e87373c484f1d259d8c205774be8fb" and "a600c1626a8cf2e4b707aaa1256de612e8fab0bc" have entirely different histories.
940f6a3313
...
a600c1626a
@ -106,17 +106,15 @@ bool BookMetadataCache::buildBookBin(const std::string& epubPath, const BookMeta
|
|||||||
// Loop through spine entries, writing LUT positions
|
// Loop through spine entries, writing LUT positions
|
||||||
spineFile.seek(0);
|
spineFile.seek(0);
|
||||||
for (int i = 0; i < spineCount; i++) {
|
for (int i = 0; i < spineCount; i++) {
|
||||||
auto pos = spineFile.position();
|
|
||||||
auto spineEntry = readSpineEntry(spineFile);
|
auto spineEntry = readSpineEntry(spineFile);
|
||||||
serialization::writePod(bookFile, pos + lutOffset + lutSize);
|
serialization::writePod(bookFile, spineFile.position() + lutOffset + lutSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loop through toc entries, writing LUT positions
|
// Loop through toc entries, writing LUT positions
|
||||||
tocFile.seek(0);
|
tocFile.seek(0);
|
||||||
for (int i = 0; i < tocCount; i++) {
|
for (int i = 0; i < tocCount; i++) {
|
||||||
auto pos = tocFile.position();
|
|
||||||
auto tocEntry = readTocEntry(tocFile);
|
auto tocEntry = readTocEntry(tocFile);
|
||||||
serialization::writePod(bookFile, pos + lutOffset + lutSize + spineFile.position());
|
serialization::writePod(bookFile, tocFile.position() + lutOffset + lutSize + spineFile.position());
|
||||||
}
|
}
|
||||||
|
|
||||||
// LUTs complete
|
// LUTs complete
|
||||||
@ -260,10 +258,6 @@ bool BookMetadataCache::load() {
|
|||||||
serialization::readPod(bookFile, spineCount);
|
serialization::readPod(bookFile, spineCount);
|
||||||
serialization::readPod(bookFile, tocCount);
|
serialization::readPod(bookFile, tocCount);
|
||||||
|
|
||||||
serialization::readString(bookFile, coreMetadata.title);
|
|
||||||
serialization::readString(bookFile, coreMetadata.author);
|
|
||||||
serialization::readString(bookFile, coreMetadata.coverItemHref);
|
|
||||||
|
|
||||||
loaded = true;
|
loaded = true;
|
||||||
Serial.printf("[%lu] [BMC] Loaded cache data: %d spine, %d TOC entries\n", millis(), spineCount, tocCount);
|
Serial.printf("[%lu] [BMC] Loaded cache data: %d spine, %d TOC entries\n", millis(), spineCount, tocCount);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user