[RU]Remanga fix detect last paid/exmanga chapter (#18006)

* [RU]Remanga fix detect last paid/exmanga chapter

* autoclean

* thisthat not work
This commit is contained in:
Eshlender 2023-09-17 21:23:19 +05:00 committed by GitHub
parent a7abd1a904
commit b9026cfdca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 12 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Remanga' extName = 'Remanga'
pkgNameSuffix = 'ru.remanga' pkgNameSuffix = 'ru.remanga'
extClass = '.Remanga' extClass = '.Remanga'
extVersionCode = 78 extVersionCode = 79
} }
dependencies { dependencies {

View File

@ -250,13 +250,7 @@ class Remanga : ConfigurableSource, HttpSource() {
// Do not change the title name to ensure work with a multilingual catalog! // Do not change the title name to ensure work with a multilingual catalog!
title = if (isEng.equals("rus")) rus_name else en_name title = if (isEng.equals("rus")) rus_name else en_name
url = "/api/titles/$dir/" url = "/api/titles/$dir/"
thumbnail_url = if (img.high?.isNotEmpty() == true) { thumbnail_url = baseUrl + img.mid
baseUrl + img.high
} else if (img.mid?.isNotEmpty() == true) {
baseUrl + img.mid
} else {
baseUrl + img.low
}
} }
private val simpleDateFormat by lazy { SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.US) } private val simpleDateFormat by lazy { SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.US) }
@ -446,7 +440,7 @@ class Remanga : ConfigurableSource, HttpSource() {
} }
private fun filterPaid(tempChaptersList: MutableList<SChapter>): MutableList<SChapter> { private fun filterPaid(tempChaptersList: MutableList<SChapter>): MutableList<SChapter> {
val lastEx = tempChaptersList.find { it.scanlator.equals("exmanga") } val lastEx = tempChaptersList.find { it.scanlator.equals("exmanga") or it.url.contains("#is_bought") }
return if (!preferences.getBoolean(PAID_PREF, false)) { return if (!preferences.getBoolean(PAID_PREF, false)) {
tempChaptersList.filter { tempChaptersList.filter {
!it.name.contains("\uD83D\uDCB2") || if (lastEx != null) { !it.name.contains("\uD83D\uDCB2") || if (lastEx != null) {
@ -559,9 +553,7 @@ class Remanga : ConfigurableSource, HttpSource() {
} }
if (chapter.is_paid and (chapter.is_bought == true)) { if (chapter.is_paid and (chapter.is_bought == true)) {
if (exChID == null) { url = "$url#is_bought"
url = "$url#is_bought"
}
} }
} else { } else {
exChID = null exChID = null