Comico: make some fields optional (#11084)
This commit is contained in:
parent
55fe02563c
commit
e00a54ca3a
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'Comico'
|
||||
pkgNameSuffix = 'all.comico'
|
||||
extClass = '.ComicoFactory'
|
||||
extVersionCode = 2
|
||||
extVersionCode = 3
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ open class Comico(
|
|||
GET(apiUrl + chapter.url, apiHeaders)
|
||||
|
||||
override fun imageRequest(page: Page) =
|
||||
GET(page.imageUrl!!.also { android.util.Log.w("URL", it) }, imgHeaders)
|
||||
GET(page.imageUrl!!, imgHeaders)
|
||||
|
||||
override fun latestUpdatesParse(response: Response) =
|
||||
popularMangaParse(response)
|
||||
|
@ -117,10 +117,10 @@ open class Comico(
|
|||
"completed" -> SManga.COMPLETED
|
||||
else -> SManga.ONGOING
|
||||
}
|
||||
author = it.authors.filter { it.isAuthor }.joinToString()
|
||||
artist = it.authors.filter { it.isArtist }.joinToString()
|
||||
author = it.authors?.filter { it.isAuthor }?.joinToString()
|
||||
artist = it.authors?.filter { it.isArtist }?.joinToString()
|
||||
genre = buildString {
|
||||
it.genres.joinTo(this)
|
||||
it.genres?.joinTo(this)
|
||||
if (it.mature) append(", Mature")
|
||||
if (it.original) append(", Original")
|
||||
if (it.exclusive) append(", Exclusive")
|
||||
|
|
|
@ -7,12 +7,12 @@ data class ContentInfo(
|
|||
val id: Int,
|
||||
val name: String,
|
||||
val description: String,
|
||||
val authors: List<Author>,
|
||||
val genres: List<Genre>,
|
||||
val original: Boolean,
|
||||
val exclusive: Boolean,
|
||||
val mature: Boolean,
|
||||
val status: String? = null,
|
||||
val genres: List<Genre>? = null,
|
||||
val authors: List<Author>? = null,
|
||||
private val thumbnails: List<Thumbnail>,
|
||||
) {
|
||||
val cover: String
|
||||
|
|
Loading…
Reference in New Issue