Disable mangadex covers and use temp covers
This commit is contained in:
parent
80cf38a70d
commit
3192140421
@ -74,8 +74,8 @@ class ApiMangaParser(val client: OkHttpClient, private val lang: String) {
|
||||
title = MdUtil.cleanString(networkManga.title[lang] ?: networkManga.title["en"]!!)
|
||||
altTitles = networkManga.altTitles.mapNotNull { it[lang] }
|
||||
|
||||
var coverUrl = MdUtil.formThumbUrl(networkApiManga.data.id)
|
||||
val coverUrlId = networkApiManga.relationships.firstOrNull { it.type == "cover_art" }?.id
|
||||
val coverUrl = MdUtil.formThumbUrl(networkApiManga.data.id)
|
||||
/*val coverUrlId = networkApiManga.relationships.firstOrNull { it.type == "cover_art" }?.id
|
||||
if (coverUrlId != null) {
|
||||
runCatching {
|
||||
val json = client.newCall(GET(MdUtil.coverUrl(networkApiManga.data.id, coverUrlId))).await()
|
||||
@ -84,7 +84,7 @@ class ApiMangaParser(val client: OkHttpClient, private val lang: String) {
|
||||
coverUrl = "${MdUtil.cdnUrl}/covers/${networkApiManga.data.id}/$fileName"
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
cover = coverUrl
|
||||
|
||||
description = MdUtil.cleanDescription(networkManga.description[lang] ?: networkManga.description["en"]!!)
|
||||
|
@ -77,8 +77,8 @@ class FollowsHandler(
|
||||
.thenBy { it.first.title }
|
||||
|
||||
return response.map {
|
||||
var coverUrl = MdUtil.formThumbUrl(it.data.id)
|
||||
val coverUrlId = it.relationships.firstOrNull { it.type == "cover_art" }?.id
|
||||
val coverUrl = MdUtil.formThumbUrl(it.data.id)
|
||||
/*val coverUrlId = it.relationships.firstOrNull { it.type == "cover_art" }?.id
|
||||
if (coverUrlId != null) {
|
||||
runCatching {
|
||||
val covers = client.newCall(GET(MdUtil.coverUrl(it.data.id, coverUrlId))).await()
|
||||
@ -87,7 +87,7 @@ class FollowsHandler(
|
||||
coverUrl = "${MdUtil.cdnUrl}/covers/${it.data.id}/$fileName"
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
MdUtil.createMangaEntry(
|
||||
it,
|
||||
|
@ -49,8 +49,8 @@ class PopularHandler(val client: OkHttpClient, private val headers: Headers, pri
|
||||
val hasMoreResults = mlResponse.limit + mlResponse.offset < mlResponse.total
|
||||
|
||||
val mangaList = mlResponse.results.map {
|
||||
var coverUrl = MdUtil.formThumbUrl(it.data.id)
|
||||
val coverUrlId = it.relationships.firstOrNull { it.type == "cover_art" }?.id
|
||||
val coverUrl = MdUtil.formThumbUrl(it.data.id)
|
||||
/*val coverUrlId = it.relationships.firstOrNull { it.type == "cover_art" }?.id
|
||||
if (coverUrlId != null) {
|
||||
runCatching {
|
||||
val covers = client.newCall(GET(MdUtil.coverUrl(it.data.id, coverUrlId))).await()
|
||||
@ -59,7 +59,7 @@ class PopularHandler(val client: OkHttpClient, private val headers: Headers, pri
|
||||
coverUrl = "${MdUtil.cdnUrl}/covers/${it.data.id}/$fileName"
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
MdUtil.createMangaEntry(it, lang, coverUrl).toSManga()
|
||||
}
|
||||
return MangasPage(mangaList, hasMoreResults)
|
||||
|
@ -31,8 +31,8 @@ class SearchHandler(val client: OkHttpClient, private val headers: Headers, val
|
||||
runAsObservable({
|
||||
val mangaResponse = response.parseAs<MangaResponse>(MdUtil.jsonParser)
|
||||
|
||||
var coverUrl = MdUtil.formThumbUrl(mangaResponse.data.id)
|
||||
val coverUrlId = mangaResponse.relationships.firstOrNull { it.type == "cover_art" }?.id
|
||||
val coverUrl = MdUtil.formThumbUrl(mangaResponse.data.id)
|
||||
/*val coverUrlId = mangaResponse.relationships.firstOrNull { it.type == "cover_art" }?.id
|
||||
if (coverUrlId != null) {
|
||||
runCatching {
|
||||
val covers = client.newCall(GET(MdUtil.coverUrl(mangaResponse.data.id, coverUrlId))).await()
|
||||
@ -41,7 +41,7 @@ class SearchHandler(val client: OkHttpClient, private val headers: Headers, val
|
||||
coverUrl = "${MdUtil.cdnUrl}/covers/${mangaResponse.data.id}/$fileName"
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
val details = apiMangaParser
|
||||
.parseToManga(MdUtil.createMangaEntry(mangaResponse, lang, coverUrl), response, emptyList(), sourceId).toSManga()
|
||||
|
Loading…
x
Reference in New Issue
Block a user