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 {
|
||||
extName = 'Flame Comics'
|
||||
extClass = '.FlameComics'
|
||||
extVersionCode = 42
|
||||
extVersionCode = 43
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
@ -51,21 +51,14 @@ class FlameComics : HttpSource() {
|
||||
addPathSegment(buildId)
|
||||
}
|
||||
|
||||
private fun imageApiUrlBuilder(dataUrl: String) = baseUrl.toHttpUrl().newBuilder().apply {
|
||||
addPathSegment("_next")
|
||||
addPathSegment("image")
|
||||
}.build().toString() + "?url=$dataUrl"
|
||||
private fun imageApiUrlBuilder() = "$cdn/uploads/images/series".toHttpUrl().newBuilder()
|
||||
|
||||
private fun thumbnailUrl(seriesData: Series) = imageApiUrlBuilder(
|
||||
cdn.toHttpUrl().newBuilder().apply {
|
||||
addPathSegment("series")
|
||||
private fun thumbnailUrl(seriesData: Series) =
|
||||
imageApiUrlBuilder().apply {
|
||||
addPathSegment(seriesData.series_id.toString())
|
||||
addPathSegment(seriesData.cover)
|
||||
addQueryParameter(seriesData.last_edit, null)
|
||||
addQueryParameter("w", "384")
|
||||
addQueryParameter("q", "75")
|
||||
}.build().toString(),
|
||||
)
|
||||
}.build().toString()
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request =
|
||||
GET(
|
||||
@ -247,9 +240,7 @@ class FlameComics : HttpSource() {
|
||||
return chapter.images.mapIndexed { idx, page ->
|
||||
Page(
|
||||
idx,
|
||||
imageUrl = imageApiUrlBuilder(
|
||||
cdn.toHttpUrl().newBuilder().apply {
|
||||
addPathSegment("series")
|
||||
imageUrl = imageApiUrlBuilder().apply {
|
||||
addPathSegment(chapter.series_id.toString())
|
||||
addPathSegment(chapter.token)
|
||||
addPathSegment(page.name)
|
||||
@ -257,10 +248,7 @@ class FlameComics : HttpSource() {
|
||||
chapter.release_date.toString(),
|
||||
value = null,
|
||||
)
|
||||
addQueryParameter("w", "1920")
|
||||
addQueryParameter("q", "100")
|
||||
}.build().toString(),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user