diff --git a/lib-multisrc/iken/build.gradle.kts b/lib-multisrc/iken/build.gradle.kts index e2f11e9c1..6e70fd158 100644 --- a/lib-multisrc/iken/build.gradle.kts +++ b/lib-multisrc/iken/build.gradle.kts @@ -2,4 +2,4 @@ plugins { id("lib-multisrc") } -baseVersionCode = 3 +baseVersionCode = 4 diff --git a/lib-multisrc/iken/src/eu/kanade/tachiyomi/multisrc/iken/Dto.kt b/lib-multisrc/iken/src/eu/kanade/tachiyomi/multisrc/iken/Dto.kt index e16a6d86c..84142f8a9 100644 --- a/lib-multisrc/iken/src/eu/kanade/tachiyomi/multisrc/iken/Dto.kt +++ b/lib-multisrc/iken/src/eu/kanade/tachiyomi/multisrc/iken/Dto.kt @@ -83,8 +83,8 @@ class Post(val post: T) @Serializable class ChapterListResponse( - val isNovel: Boolean, - val slug: String, + val isNovel: Boolean = false, + val slug: String? = null, val chapters: List, ) @@ -96,11 +96,13 @@ class Chapter( private val createdBy: Name, private val createdAt: String, private val chapterStatus: String, + private val mangaPost: ChapterPostDetails, ) { fun isPublic() = chapterStatus == "PUBLIC" - fun toSChapter(mangaSlug: String) = SChapter.create().apply { - url = "/series/$mangaSlug/$slug#$id" + fun toSChapter(mangaSlug: String?) = SChapter.create().apply { + val seriesSlug = mangaSlug ?: mangaPost.slug + url = "/series/$seriesSlug/$slug#$id" name = "Chapter $number" scanlator = createdBy.name date_upload = try { @@ -111,4 +113,9 @@ class Chapter( } } +@Serializable +class ChapterPostDetails( + val slug: String, +) + private val dateFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ENGLISH)