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() =