diff --git a/lib-multisrc/gmanga/build.gradle.kts b/lib-multisrc/gmanga/build.gradle.kts index dc076cc37..9dce2478c 100644 --- a/lib-multisrc/gmanga/build.gradle.kts +++ b/lib-multisrc/gmanga/build.gradle.kts @@ -2,4 +2,4 @@ plugins { id("lib-multisrc") } -baseVersionCode = 1 +baseVersionCode = 2 diff --git a/lib-multisrc/gmanga/src/eu/kanade/tachiyomi/multisrc/gmanga/Dto.kt b/lib-multisrc/gmanga/src/eu/kanade/tachiyomi/multisrc/gmanga/Dto.kt index 3a0943c62..f0822db3d 100644 --- a/lib-multisrc/gmanga/src/eu/kanade/tachiyomi/multisrc/gmanga/Dto.kt +++ b/lib-multisrc/gmanga/src/eu/kanade/tachiyomi/multisrc/gmanga/Dto.kt @@ -29,12 +29,12 @@ class SearchMangaDto( class BrowseManga( private val id: Int, private val title: String, - private val cover: String, + private val cover: String? = null, ) { fun toSManga(createThumbnail: (String, String) -> String) = SManga.create().apply { url = "/mangas/$id" title = this@BrowseManga.title - thumbnail_url = createThumbnail(id.toString(), cover) + thumbnail_url = cover?.let { createThumbnail(id.toString(), cover) } } } @@ -58,7 +58,7 @@ class MangaDetailsDto( @Serializable class Manga( private val id: Int, - private val cover: String, + private val cover: String? = null, private val title: String, private val summary: String? = null, private val artists: List, @@ -74,7 +74,7 @@ class Manga( ) { fun toSManga(createThumbnail: (String, String) -> String) = SManga.create().apply { title = this@Manga.title - thumbnail_url = createThumbnail(id.toString(), cover) + thumbnail_url = cover?.let { createThumbnail(id.toString(), cover) } artist = artists.joinToString { it.name } author = authors.joinToString { it.name } status = when (this@Manga.status) { @@ -105,6 +105,8 @@ class Manga( } val titles = listOfNotNull(synonyms, arTitle, jpTitle, enTitle) + .filterNot(String::isEmpty) + if (titles.isNotEmpty()) { append("\n\n") append("مسميّات أخرى")