mirror of
https://github.com/gotson/komga.git
synced 2025-12-15 04:53:44 +01:00
fix: some epub resources would not be detected properly
Closes: #1442 Closes: #1441
This commit is contained in:
parent
d34d4a5653
commit
f8e40ce968
1 changed files with 3 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ import org.gotson.komga.infrastructure.mediacontainer.ContentDetector
|
|||
import org.jsoup.Jsoup
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.stereotype.Service
|
||||
import org.springframework.web.util.UriUtils
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.Path
|
||||
import kotlin.io.path.invariantSeparatorsPathString
|
||||
|
|
@ -98,7 +99,7 @@ class EpubExtractor(
|
|||
val pages =
|
||||
spine.map { page ->
|
||||
MediaFile(
|
||||
normalizeHref(epub.opfDir, page.href),
|
||||
normalizeHref(epub.opfDir, UriUtils.decode(page.href, Charsets.UTF_8)),
|
||||
page.mediaType,
|
||||
MediaFile.SubType.EPUB_PAGE,
|
||||
)
|
||||
|
|
@ -107,7 +108,7 @@ class EpubExtractor(
|
|||
val assets =
|
||||
epub.manifest.values.filterNot { spine.contains(it) }.map {
|
||||
MediaFile(
|
||||
normalizeHref(epub.opfDir, it.href),
|
||||
normalizeHref(epub.opfDir, UriUtils.decode(it.href, Charsets.UTF_8)),
|
||||
it.mediaType,
|
||||
MediaFile.SubType.EPUB_ASSET,
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue