diff --git a/src/ru/yagamiproject/build.gradle b/src/ru/yagamiproject/build.gradle index a6e833c13..697659287 100644 --- a/src/ru/yagamiproject/build.gradle +++ b/src/ru/yagamiproject/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'YagamiProject' pkgNameSuffix = 'ru.yagamiproject' extClass = '.YagamiProject' - extVersionCode = 4 + extVersionCode = 5 } apply from: "$rootDir/common.gradle" diff --git a/src/ru/yagamiproject/src/eu/kanade/tachiyomi/extension/ru/mangabook/YagamiProject.kt b/src/ru/yagamiproject/src/eu/kanade/tachiyomi/extension/ru/mangabook/YagamiProject.kt index 8a893f33f..2b0cab106 100644 --- a/src/ru/yagamiproject/src/eu/kanade/tachiyomi/extension/ru/mangabook/YagamiProject.kt +++ b/src/ru/yagamiproject/src/eu/kanade/tachiyomi/extension/ru/mangabook/YagamiProject.kt @@ -52,30 +52,28 @@ class YagamiProject : ParsedHttpSource() { // Search override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - val url = if (query.isNotBlank()) { - "$baseUrl/reader/search/?s=$query&p=$page" - } else { - (if (filters.isEmpty()) getFilterList() else filters).forEach { filter -> - when (filter) { - is CategoryList -> { - if (filter.state > 0) { - val CatQ = getCategoryList()[filter.state].name - val catUrl = "$baseUrl/tags/$CatQ".toHttpUrlOrNull()!!.newBuilder() - return GET(catUrl.toString(), headers) - } + if (query.isNotBlank()) { + return GET("$baseUrl/reader/search/?s=$query&p=$page", headers) + } + (if (filters.isEmpty()) getFilterList() else filters).forEach { filter -> + when (filter) { + is CategoryList -> { + if (filter.state > 0) { + val CatQ = getCategoryList()[filter.state].name + val catUrl = "$baseUrl/tags/$CatQ".toHttpUrlOrNull()!!.newBuilder() + return GET(catUrl.toString(), headers) } - is FormatList -> { - if (filter.state > 0) { - val FormN = getFormatList()[filter.state].query - val formaUrl = "$baseUrl/$FormN".toHttpUrlOrNull()!!.newBuilder() - return GET(formaUrl.toString(), headers) - } + } + is FormatList -> { + if (filter.state > 0) { + val FormN = getFormatList()[filter.state].query + val formaUrl = "$baseUrl/$FormN".toHttpUrlOrNull()!!.newBuilder() + return GET(formaUrl.toString(), headers) } } } - throw Exception("Filters Not") } - return GET(url, headers) + return popularMangaRequest(page) } override fun searchMangaNextPageSelector() = popularMangaNextPageSelector() @@ -92,8 +90,8 @@ class YagamiProject : ParsedHttpSource() { val titlestr = document.select("title").text().substringBefore(" :: Yagami").split(" :: ").sorted() manga.title = titlestr.first().replace(":: ", "") manga.thumbnail_url = document.select(".cover img").first().attr("src") - manga.author = infoElement.select("li:contains(Автор(ы):)")?.first()?.text()?.substringAfter("Автор(ы): ")?.split(" / ")?.sorted()?.first() - manga.artist = infoElement.select("li:contains(Художник(и):)")?.first()?.text()?.substringAfter("Художник(и): ")?.split(" / ")?.sorted()?.first() + manga.author = infoElement.select("li:contains(Автор(ы):)")?.first()?.text()?.substringAfter("Автор(ы): ")?.split(" / ")?.sorted()?.first()?.replace("N/A", "")?.trim() + manga.artist = infoElement.select("li:contains(Художник(и):)")?.first()?.text()?.substringAfter("Художник(и): ")?.split(" / ")?.sorted()?.first()?.replace("N/A", "")?.trim() manga.status = when (infoElement.select("li:contains(Статус перевода:) span")?.first()?.text()) { "онгоинг" -> SManga.ONGOING "активный" -> SManga.ONGOING @@ -106,7 +104,8 @@ class YagamiProject : ParsedHttpSource() { if (altSelector.isNotEmpty()) { altName = "Альтернативные названия:\n" + altSelector.first().toString().replace("