Comick: thumbnails (#16135)
This commit is contained in:
parent
df726a5122
commit
7e37c68ba1
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'Comick'
|
extName = 'Comick'
|
||||||
pkgNameSuffix = 'all.comickfun'
|
pkgNameSuffix = 'all.comickfun'
|
||||||
extClass = '.ComickFunFactory'
|
extClass = '.ComickFunFactory'
|
||||||
extVersionCode = 24
|
extVersionCode = 25
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,11 +177,9 @@ abstract class ComickFun(override val lang: String, private val comickFunLang: S
|
||||||
// appennding # at end as part of migration from slug to hid
|
// appennding # at end as part of migration from slug to hid
|
||||||
url = "/comic/${data.hid}#"
|
url = "/comic/${data.hid}#"
|
||||||
title = data.title
|
title = data.title
|
||||||
thumbnail_url = if (data.md_covers.isNotEmpty()) {
|
thumbnail_url = runCatching {
|
||||||
"$cdnUrl/${data.md_covers[0].b2key}"
|
"$cdnUrl/${data.md_covers.first().b2key}"
|
||||||
} else {
|
}.getOrNull()
|
||||||
"$baseUrl/static/failed_to_load.png"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
|
@ -216,11 +214,9 @@ abstract class ComickFun(override val lang: String, private val comickFunLang: S
|
||||||
description = beautifyDescription(mangaData.comic.desc)
|
description = beautifyDescription(mangaData.comic.desc)
|
||||||
genre = mangaData.genres.joinToString { it.name.trim() }
|
genre = mangaData.genres.joinToString { it.name.trim() }
|
||||||
status = parseStatus(mangaData.comic.status)
|
status = parseStatus(mangaData.comic.status)
|
||||||
thumbnail_url = if (mangaData.comic.md_covers.isNotEmpty()) {
|
thumbnail_url = runCatching {
|
||||||
"$cdnUrl/${mangaData.comic.md_covers[0].b2key}"
|
"$cdnUrl/${mangaData.comic.md_covers.first().b2key}"
|
||||||
} else {
|
}.getOrNull()
|
||||||
"$baseUrl/static/failed_to_load.png"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ data class Manga(
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class MDcovers(
|
data class MDcovers(
|
||||||
val b2key: String,
|
val b2key: String?,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
|
Loading…
Reference in New Issue