Flame Comics: use friendly URL for latest tab (#6402)
This commit is contained in:
parent
f80a060670
commit
f9566c55e4
|
@ -107,12 +107,9 @@ class FlameComics : HttpSource() {
|
||||||
SManga.create().apply {
|
SManga.create().apply {
|
||||||
title = seriesData.title
|
title = seriesData.title
|
||||||
setUrlWithoutDomain(
|
setUrlWithoutDomain(
|
||||||
dataApiReqBuilder().apply {
|
baseUrl.toHttpUrl().newBuilder().apply {
|
||||||
val seriesID =
|
|
||||||
seriesData.series_id
|
|
||||||
addPathSegment("series")
|
addPathSegment("series")
|
||||||
addPathSegment("$seriesID.json")
|
addPathSegment(seriesData.series_id.toString())
|
||||||
addQueryParameter("id", seriesData.series_id.toString())
|
|
||||||
}.build().toString(),
|
}.build().toString(),
|
||||||
)
|
)
|
||||||
thumbnail_url = imageApiUrlBuilder(
|
thumbnail_url = imageApiUrlBuilder(
|
||||||
|
@ -164,12 +161,11 @@ class FlameComics : HttpSource() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var lastPage = page * 20
|
|
||||||
if (lastPage > manga.size) {
|
val itemsPerPage = 20
|
||||||
lastPage = manga.size
|
val startIndex = (page - 1) * itemsPerPage
|
||||||
}
|
val endIndex = minOf(page * itemsPerPage, manga.size)
|
||||||
if (lastPage < 0) lastPage = 0
|
return MangasPage(manga.subList(startIndex, endIndex), endIndex < manga.size)
|
||||||
return MangasPage(manga.subList((page - 1) * 20, lastPage), lastPage < manga.size)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun mangaDetailsRequest(manga: SManga): Request = GET(
|
override fun mangaDetailsRequest(manga: SManga): Request = GET(
|
||||||
|
|
Loading…
Reference in New Issue