diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinGenerator.kt index d7c6ee99b..7e3b0226e 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinGenerator.kt @@ -8,7 +8,7 @@ class BakkinGenerator : ThemeSourceGenerator { override val themeClass = "BakkinReaderX" - override val baseVersionCode = 4 + override val baseVersionCode = 5 override val sources = listOf( SingleLang("Bakkin", "https://bakkin.moe/reader/", "en"), diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinJSON.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinJSON.kt index feb3b8a92..a1cd6b1b6 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinJSON.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinJSON.kt @@ -10,7 +10,12 @@ internal data class Series( val volumes: List ) : Iterable { override fun iterator() = volumes.flatMap { vol -> - vol.map { it.copy("$dir/${vol.dir}/${it.dir}", "$vol - $it") } + vol.map { + it.copy( + name = "$vol - $it", + dir = "$dir/${vol.dir}/${it.dir}" + ) + } }.iterator() val cover: String @@ -34,5 +39,8 @@ internal data class Chapter( val name: String, val pages: List ) : Iterable by pages { + val number: Float + get() = dir.substringAfterLast('c').toFloatOrNull() ?: -1f + override fun toString() = name.ifEmpty { dir } } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinReaderX.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinReaderX.kt index 64a584902..e39b01618 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinReaderX.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/bakkin/BakkinReaderX.kt @@ -99,11 +99,11 @@ abstract class BakkinReaderX( override fun fetchChapterList(manga: SManga) = observableSeries { series -> - series.first { it.dir == manga.url }.mapIndexed { idx, chapter -> + series.first { it.dir == manga.url }.map { chapter -> SChapter.create().apply { url = chapter.dir name = chapter.toString() - chapter_number = idx.toFloat() + chapter_number = chapter.number date_upload = 0L } }.reversed()