| 90 | } |
| 91 | |
| 92 | bool BookMetadataCache::endWrite() { |
| 93 | if (!buildMode) { |
| 94 | LOG_DBG("BMC", "endWrite called but not in build mode"); |
| 95 | return false; |
| 96 | } |
| 97 | |
| 98 | buildMode = false; |
| 99 | LOG_DBG("BMC", "Wrote %d spine, %d TOC entries", spineCount, tocCount); |
| 100 | return true; |
| 101 | } |
| 102 | |
| 103 | bool BookMetadataCache::buildBookBin(const std::string& epubPath, const BookMetadata& metadata) { |
| 104 | // Open all three files, writing to meta, reading from spine and toc |