From 5f9d4e1dc69047ffda37c6e2d1099ce7d33e315c Mon Sep 17 00:00:00 2001 From: KenjieDec <65448230+KenjieDec@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:34:58 +0700 Subject: [PATCH] Kemono | Fixed some chapters/images not loading due to missing 'name' (#6443) Fixed some chapters/images not loading due to missing 'name' --- lib-multisrc/kemono/build.gradle.kts | 2 +- .../src/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib-multisrc/kemono/build.gradle.kts b/lib-multisrc/kemono/build.gradle.kts index aea7b2d34..faa70cdf6 100644 --- a/lib-multisrc/kemono/build.gradle.kts +++ b/lib-multisrc/kemono/build.gradle.kts @@ -2,4 +2,4 @@ plugins { id("lib-multisrc") } -baseVersionCode = 15 +baseVersionCode = 16 diff --git a/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt b/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt index 7df45a075..7488b8b81 100644 --- a/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt +++ b/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt @@ -70,7 +70,7 @@ class KemonoPostDto( ) { val images: List get() = buildList(attachments.size + 1) { - if (file.path != null) add(KemonoAttachmentDto(file.name!!, file.path)) + if (file.path != null) add(KemonoAttachmentDto(file.name, file.path)) addAll(attachments) }.filter { when (it.path.substringAfterLast('.').lowercase()) { @@ -106,8 +106,8 @@ class KemonoFileDto(val name: String? = null, val path: String? = null) // name might have ".jpe" extension for JPEG, path might have ".m4v" extension for MP4 @Serializable -class KemonoAttachmentDto(val name: String, val path: String) { - override fun toString() = "$path?f=$name" +class KemonoAttachmentDto(var name: String? = null, val path: String) { + override fun toString() = path + if (name != null) "?f=$name" else "" } private fun getApiDateFormat() =