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