[RU]Remanga show chapters when licensed (#13948)
This commit is contained in:
parent
eb5b385a43
commit
3c49304709
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'Remanga'
|
extName = 'Remanga'
|
||||||
pkgNameSuffix = 'ru.remanga'
|
pkgNameSuffix = 'ru.remanga'
|
||||||
extClass = '.Remanga'
|
extClass = '.Remanga'
|
||||||
extVersionCode = 57
|
extVersionCode = 58
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -153,7 +153,6 @@ class Remanga : ConfigurableSource, HttpSource() {
|
||||||
thumbnail_url = "$baseUrl/icon.png"
|
thumbnail_url = "$baseUrl/icon.png"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
return MangasPage(mangas, page.props.page < page.props.total_pages)
|
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>> {
|
override fun fetchChapterList(manga: SManga): Observable<List<SChapter>> {
|
||||||
val branch = branches.getOrElse(manga.title) { mangaBranches(manga) }
|
val branch = branches.getOrElse(manga.title) { mangaBranches(manga) }
|
||||||
return when {
|
return when {
|
||||||
|
manga.status == SManga.LICENSED && branch.isEmpty() -> {
|
||||||
|
Observable.error(Exception("Лицензировано - Нет глав"))
|
||||||
|
}
|
||||||
branch.isEmpty() -> {
|
branch.isEmpty() -> {
|
||||||
return Observable.just(listOf())
|
return Observable.just(listOf())
|
||||||
}
|
}
|
||||||
manga.status == SManga.LICENSED -> {
|
|
||||||
Observable.error(Exception("Лицензировано - Нет глав"))
|
|
||||||
}
|
|
||||||
else -> {
|
else -> {
|
||||||
val selectedBranch = branch.maxByOrNull { selector(it) }!!
|
val selectedBranch = branch.maxByOrNull { selector(it) }!!
|
||||||
return (1..(selectedBranch.count_chapters / 100 + 1)).map {
|
return (1..(selectedBranch.count_chapters / 100 + 1)).map {
|
||||||
|
|
Loading…
Reference in New Issue