A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: Add EPUB 3 cover image detection (#760)

I had an epub that just showed a blank cover and wouldnt work for the
sleep screen either, turns out it was an epub3 and I guess we didn't
support that. Super simple fix here

authored by

Justin Mitchell and committed by
GitHub
71769490 cda0a3f8

+8
+8
lib/Epub/Epub/parsers/ContentOpfParser.cpp
··· 232 232 Serial.printf("[%lu] [COF] Found EPUB 3 nav document: %s\n", millis(), href.c_str()); 233 233 } 234 234 } 235 + 236 + // EPUB 3: Check for cover image (properties contains "cover-image") 237 + if (!properties.empty() && self->coverItemHref.empty()) { 238 + if (properties == "cover-image" || properties.find("cover-image ") == 0 || 239 + properties.find(" cover-image") != std::string::npos) { 240 + self->coverItemHref = href; 241 + } 242 + } 235 243 return; 236 244 } 237 245