From f8ca936ee7ffcfd9b2a71e6444d0ce8130f006b6 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 3 Nov 2025 10:37:32 +0800 Subject: [PATCH] fix: properly decode cover href when generating epub cover Closes: #2118 --- .../komga/infrastructure/mediacontainer/epub/EpubExtractor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/epub/EpubExtractor.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/epub/EpubExtractor.kt index d2072e310..8db0230c8 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/epub/EpubExtractor.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/epub/EpubExtractor.kt @@ -67,7 +67,7 @@ class EpubExtractor( ?: // try id="cover-image" manifest.values.firstOrNull { it.id == "cover-image" } if (coverManifestItem != null) { - val href = coverManifestItem.href + val href = URLDecoder.decode(coverManifestItem.href, Charsets.UTF_8) val mediaType = coverManifestItem.mediaType val coverPath = normalizeHref(opfDir, href) zip.getEntryBytes(coverPath)?.let { coverBytes ->