MangaPark - force network request for chapters (#3471)

This commit is contained in:
Mike 2020-06-10 01:27:30 -04:00 committed by GitHub
parent 59bb99ed49
commit 1ad4002be9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: MangaPark'
pkgNameSuffix = 'en.mangapark'
extClass = '.MangaPark'
extVersionCode = 13
extVersionCode = 14
libVersion = '1.2'
}

View File

@ -19,6 +19,7 @@ import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
import kotlin.math.absoluteValue
import okhttp3.CacheControl
import okhttp3.Request
import okhttp3.Response
import org.json.JSONArray
@ -117,6 +118,11 @@ class MangaPark : ConfigurableSource, ParsedHttpSource() {
description = document.getElementsByClass("summary").text().trim()
}
// force network to make sure chapter prefs take effect
override fun chapterListRequest(manga: SManga): Request {
return GET(baseUrl + manga.url, headers, CacheControl.FORCE_NETWORK)
}
override fun chapterListParse(response: Response): List<SChapter> {
fun List<SChapter>.getMissingChapters(allChapters: List<SChapter>): List<SChapter> {
val chapterNums = this.map { it.chapter_number }