Doujin.io: only use images as pages (#8152)

This commit is contained in:
Fermín Cirella 2025-03-23 12:04:05 -03:00 committed by Draff
parent 72c0ecc64f
commit 63d0d76535
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 16 additions and 9 deletions

View File

@ -1,7 +1,7 @@
ext { ext {
extName = 'Doujin.io - J18' extName = 'Doujin.io - J18'
extClass = '.Doujinio' extClass = '.Doujinio'
extVersionCode = 1 extVersionCode = 2
isNsfw = true isNsfw = true
} }

View File

@ -60,7 +60,10 @@ class Chapter(
class ChapterMetadata(val identifier: String) class ChapterMetadata(val identifier: String)
@Serializable @Serializable
class ChapterPage(val href: String) class ChapterPage(
val href: String,
val type: String,
)
@Serializable @Serializable
class ChapterManifest( class ChapterManifest(
@ -68,13 +71,17 @@ class ChapterManifest(
@SerialName("readingOrder") @SerialName("readingOrder")
private val pages: List<ChapterPage>, private val pages: List<ChapterPage>,
) { ) {
fun toPageList() = pages.mapIndexed { i, page -> fun toPageList() =
Page( pages
index = i, .filter { page ->
url = metadata.identifier, page.type.startsWith("image")
imageUrl = page.href, }.mapIndexed { i, page ->
) Page(
} index = i,
url = metadata.identifier,
imageUrl = page.href,
)
}
} }
@Serializable @Serializable