mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 10:22:47 +01:00
Comick: attempt cache busting (#4363)
This commit is contained in:
parent
f8afc640e6
commit
5b71368240
@ -1,7 +1,7 @@
|
||||
ext {
|
||||
extName = 'Comick'
|
||||
extClass = '.ComickFactory'
|
||||
extVersionCode = 46
|
||||
extVersionCode = 47
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
@ -463,7 +463,16 @@ abstract class Comick(
|
||||
|
||||
override fun pageListParse(response: Response): List<Page> {
|
||||
val result = response.parseAs<PageList>()
|
||||
return result.chapter.images.mapIndexedNotNull { index, data ->
|
||||
val images = result.chapter.images.ifEmpty {
|
||||
// cache busting
|
||||
val url = response.request.url.newBuilder()
|
||||
.addQueryParameter("_", System.currentTimeMillis().toString())
|
||||
.build()
|
||||
|
||||
client.newCall(GET(url, headers)).execute()
|
||||
.parseAs<PageList>().chapter.images
|
||||
}
|
||||
return images.mapIndexedNotNull { index, data ->
|
||||
if (data.url == null) null else Page(index = index, imageUrl = data.url)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user