[Remanga] Show bought chapters

This commit is contained in:
2022-12-26 17:45:35 +02:00
parent efd0394398
commit c7c142f4a0
2 changed files with 5 additions and 4 deletions

View File

@@ -1,5 +1,3 @@
import tasks.ReportGenerateTask
plugins {
id 'java-library'
id 'org.jetbrains.kotlin.jvm'
@@ -70,4 +68,4 @@ dependencies {
testImplementation 'io.webfolder:quickjs:1.1.0'
}
task generateTestsReport(type: ReportGenerateTask)
tasks.register('generateTestsReport')

View File

@@ -140,7 +140,10 @@ internal class RemangaParser(
)
},
chapters = chapters.mapChapters { i, jo ->
if (jo.getBooleanOrDefault("is_paid", false)) {
if (
jo.getBooleanOrDefault("is_paid", false) &&
!jo.getBooleanOrDefault("is_bought", false)
) {
return@mapChapters null
}
val id = jo.getLong("id")