Flamecomics: Fix images (#9802)
* Fix flamecomics images * Update src/en/flamecomics/src/eu/kanade/tachiyomi/extension/en/flamecomics/FlameComics.kt Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com> --------- Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
This commit is contained in:
parent
7326524050
commit
f9d0fec4ff
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'Flame Comics'
|
extName = 'Flame Comics'
|
||||||
extClass = '.FlameComics'
|
extClass = '.FlameComics'
|
||||||
extVersionCode = 42
|
extVersionCode = 43
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -51,21 +51,14 @@ class FlameComics : HttpSource() {
|
|||||||
addPathSegment(buildId)
|
addPathSegment(buildId)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun imageApiUrlBuilder(dataUrl: String) = baseUrl.toHttpUrl().newBuilder().apply {
|
private fun imageApiUrlBuilder() = "$cdn/uploads/images/series".toHttpUrl().newBuilder()
|
||||||
addPathSegment("_next")
|
|
||||||
addPathSegment("image")
|
|
||||||
}.build().toString() + "?url=$dataUrl"
|
|
||||||
|
|
||||||
private fun thumbnailUrl(seriesData: Series) = imageApiUrlBuilder(
|
private fun thumbnailUrl(seriesData: Series) =
|
||||||
cdn.toHttpUrl().newBuilder().apply {
|
imageApiUrlBuilder().apply {
|
||||||
addPathSegment("series")
|
|
||||||
addPathSegment(seriesData.series_id.toString())
|
addPathSegment(seriesData.series_id.toString())
|
||||||
addPathSegment(seriesData.cover)
|
addPathSegment(seriesData.cover)
|
||||||
addQueryParameter(seriesData.last_edit, null)
|
addQueryParameter(seriesData.last_edit, null)
|
||||||
addQueryParameter("w", "384")
|
}.build().toString()
|
||||||
addQueryParameter("q", "75")
|
|
||||||
}.build().toString(),
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request =
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request =
|
||||||
GET(
|
GET(
|
||||||
@ -247,20 +240,15 @@ class FlameComics : HttpSource() {
|
|||||||
return chapter.images.mapIndexed { idx, page ->
|
return chapter.images.mapIndexed { idx, page ->
|
||||||
Page(
|
Page(
|
||||||
idx,
|
idx,
|
||||||
imageUrl = imageApiUrlBuilder(
|
imageUrl = imageApiUrlBuilder().apply {
|
||||||
cdn.toHttpUrl().newBuilder().apply {
|
addPathSegment(chapter.series_id.toString())
|
||||||
addPathSegment("series")
|
addPathSegment(chapter.token)
|
||||||
addPathSegment(chapter.series_id.toString())
|
addPathSegment(page.name)
|
||||||
addPathSegment(chapter.token)
|
addQueryParameter(
|
||||||
addPathSegment(page.name)
|
chapter.release_date.toString(),
|
||||||
addQueryParameter(
|
value = null,
|
||||||
chapter.release_date.toString(),
|
)
|
||||||
value = null,
|
}.build().toString(),
|
||||||
)
|
|
||||||
addQueryParameter("w", "1920")
|
|
||||||
addQueryParameter("q", "100")
|
|
||||||
}.build().toString(),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user