[RU]Remanga show chapters when licensed (#13948)

This commit is contained in:
Eshlender 2022-10-23 03:15:43 +05:00 committed by GitHub
parent eb5b385a43
commit 3c49304709
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

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

View File

@ -153,7 +153,6 @@ class Remanga : ConfigurableSource, HttpSource() {
thumbnail_url = "$baseUrl/icon.png"
}
)
return MangasPage(mangas, page.props.page < page.props.total_pages)
}
}
@ -340,12 +339,12 @@ class Remanga : ConfigurableSource, HttpSource() {
override fun fetchChapterList(manga: SManga): Observable<List<SChapter>> {
val branch = branches.getOrElse(manga.title) { mangaBranches(manga) }
return when {
manga.status == SManga.LICENSED && branch.isEmpty() -> {
Observable.error(Exception("Лицензировано - Нет глав"))
}
branch.isEmpty() -> {
return Observable.just(listOf())
}
manga.status == SManga.LICENSED -> {
Observable.error(Exception("Лицензировано - Нет глав"))
}
else -> {
val selectedBranch = branch.maxByOrNull { selector(it) }!!
return (1..(selectedBranch.count_chapters / 100 + 1)).map {