Comick: thumbnails (#16135)

This commit is contained in:
mobi2002 2023-04-24 04:09:15 +05:00 committed by GitHub
parent df726a5122
commit 7e37c68ba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 12 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Comick'
pkgNameSuffix = 'all.comickfun'
extClass = '.ComickFunFactory'
extVersionCode = 24
extVersionCode = 25
isNsfw = true
}

View File

@ -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
url = "/comic/${data.hid}#"
title = data.title
thumbnail_url = if (data.md_covers.isNotEmpty()) {
"$cdnUrl/${data.md_covers[0].b2key}"
} else {
"$baseUrl/static/failed_to_load.png"
}
thumbnail_url = runCatching {
"$cdnUrl/${data.md_covers.first().b2key}"
}.getOrNull()
}
},
/*
@ -216,11 +214,9 @@ abstract class ComickFun(override val lang: String, private val comickFunLang: S
description = beautifyDescription(mangaData.comic.desc)
genre = mangaData.genres.joinToString { it.name.trim() }
status = parseStatus(mangaData.comic.status)
thumbnail_url = if (mangaData.comic.md_covers.isNotEmpty()) {
"$cdnUrl/${mangaData.comic.md_covers[0].b2key}"
} else {
"$baseUrl/static/failed_to_load.png"
}
thumbnail_url = runCatching {
"$cdnUrl/${mangaData.comic.md_covers.first().b2key}"
}.getOrNull()
}
}

View File

@ -11,7 +11,7 @@ data class Manga(
@Serializable
data class MDcovers(
val b2key: String,
val b2key: String?,
)
@Serializable