diff --git a/src/pt/prismascans/build.gradle b/src/pt/prismascans/build.gradle index fe6e3a859..23d0d1ee6 100644 --- a/src/pt/prismascans/build.gradle +++ b/src/pt/prismascans/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.DemonSect' themePkg = 'madara' baseUrl = 'https://demonsect.com.br' - overrideVersionCode = 4 + overrideVersionCode = 5 } apply from: "$rootDir/common.gradle" diff --git a/src/pt/prismascans/src/eu/kanade/tachiyomi/extension/pt/prismascans/DemonSect.kt b/src/pt/prismascans/src/eu/kanade/tachiyomi/extension/pt/prismascans/DemonSect.kt index 878d1f4a0..62f0b1622 100644 --- a/src/pt/prismascans/src/eu/kanade/tachiyomi/extension/pt/prismascans/DemonSect.kt +++ b/src/pt/prismascans/src/eu/kanade/tachiyomi/extension/pt/prismascans/DemonSect.kt @@ -1,8 +1,11 @@ package eu.kanade.tachiyomi.extension.pt.prismascans import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.asObservable import eu.kanade.tachiyomi.network.interceptor.rateLimit +import eu.kanade.tachiyomi.source.model.MangasPage import okhttp3.OkHttpClient +import rx.Observable import java.text.SimpleDateFormat import java.util.Locale import java.util.concurrent.TimeUnit @@ -21,5 +24,23 @@ class DemonSect : Madara( .rateLimit(1, 2, TimeUnit.SECONDS) .build() + override val useLoadMoreRequest = LoadMoreStrategy.Never + override val useNewChapterEndpoint = true + + override fun fetchPopularManga(page: Int): Observable { + return client.newCall(popularMangaRequest(page)) + .asObservable() // Site returns http 404 even if the result is successful + .map { response -> + popularMangaParse(response) + } + } + + override fun fetchLatestUpdates(page: Int): Observable { + return client.newCall(latestUpdatesRequest(page)) + .asObservable() // Site returns http 404 even if the result is successful + .map { response -> + latestUpdatesParse(response) + } + } }