feat: try to guess epub cover if not standard

Closes: #1835
This commit is contained in:
Gauthier Roebroeck 2025-01-21 16:04:42 +08:00
parent 7ef59b0cda
commit 681337af63

View file

@ -64,7 +64,8 @@ class EpubExtractor(
?.attr("content")
?.ifBlank { null }
?.let { manifest[it] }
?: // try id="cover-image"
manifest.values.firstOrNull { it.id == "cover-image" }
if (coverManifestItem != null) {
val href = coverManifestItem.href
val mediaType = coverManifestItem.mediaType