From 3c493047092df65dea00ad6ce5f311ca8bec6157 Mon Sep 17 00:00:00 2001 From: Eshlender <35057681+e-shl@users.noreply.github.com> Date: Sun, 23 Oct 2022 03:15:43 +0500 Subject: [PATCH] [RU]Remanga show chapters when licensed (#13948) --- src/ru/remanga/build.gradle | 2 +- .../eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ru/remanga/build.gradle b/src/ru/remanga/build.gradle index 523952786..02eaae7b5 100644 --- a/src/ru/remanga/build.gradle +++ b/src/ru/remanga/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Remanga' pkgNameSuffix = 'ru.remanga' extClass = '.Remanga' - extVersionCode = 57 + extVersionCode = 58 } dependencies { diff --git a/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt b/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt index 80a21c598..7140bda0c 100644 --- a/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt +++ b/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt @@ -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> { 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 {