[RU]Remanga fix LICENSED Hides available chapters! (#959)
This commit is contained in:
parent
7e2fa5de61
commit
169f83b594
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Remanga'
|
extName = 'Remanga'
|
||||||
extClass = '.Remanga'
|
extClass = '.Remanga'
|
||||||
extVersionCode = 84
|
extVersionCode = 85
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -338,7 +338,7 @@ class Remanga : ConfigurableSource, HttpSource() {
|
||||||
2 -> SManga.ON_HIATUS // Заморожен
|
2 -> SManga.ON_HIATUS // Заморожен
|
||||||
3 -> SManga.ON_HIATUS // Нет переводчика
|
3 -> SManga.ON_HIATUS // Нет переводчика
|
||||||
4 -> SManga.ONGOING // Анонс
|
4 -> SManga.ONGOING // Анонс
|
||||||
5 -> SManga.LICENSED // Лицензировано
|
// 5 -> SManga.LICENSED // Лицензировано // Hides available chapters!
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -439,7 +439,7 @@ class Remanga : ConfigurableSource, HttpSource() {
|
||||||
val series = json.decodeFromJsonElement<MangaDetDto>(content)
|
val series = json.decodeFromJsonElement<MangaDetDto>(content)
|
||||||
branches[series.dir] = series.branches
|
branches[series.dir] = series.branches
|
||||||
mangaIDs[series.dir] = series.id
|
mangaIDs[series.dir] = series.id
|
||||||
if (parseStatus(series.status.id) == SManga.LICENSED && series.branches.maxByOrNull { selector(it) }!!.count_chapters == 0) {
|
if (series.status.id == 5 && series.branches.maxByOrNull { selector(it) }!!.count_chapters == 0) {
|
||||||
throw Exception("Лицензировано - Нет глав")
|
throw Exception("Лицензировано - Нет глав")
|
||||||
}
|
}
|
||||||
series.branches
|
series.branches
|
||||||
|
@ -472,7 +472,7 @@ 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.url.substringAfter("/api/titles/").substringBefore("/").substringBefore("?")) { mangaBranches(manga) }
|
val branch = branches.getOrElse(manga.url.substringAfter("/api/titles/").substringBefore("/").substringBefore("?")) { mangaBranches(manga) }
|
||||||
return when {
|
return when {
|
||||||
manga.status == SManga.LICENSED && branch.maxByOrNull { selector(it) }!!.count_chapters == 0 -> {
|
branch.maxByOrNull { selector(it) }!!.count_chapters == 0 -> {
|
||||||
Observable.error(Exception("Лицензировано - Нет глав"))
|
Observable.error(Exception("Лицензировано - Нет глав"))
|
||||||
}
|
}
|
||||||
branch.isEmpty() -> {
|
branch.isEmpty() -> {
|
||||||
|
|
Loading…
Reference in New Issue