[RU]YagamiProject universal chapter_number (#7883)
* [RU]YagamiProject universal chapter_number * restart
This commit is contained in:
parent
5c3565ac26
commit
35a7ec0ac9
@ -5,7 +5,7 @@ ext {
|
|||||||
extName = 'YagamiProject'
|
extName = 'YagamiProject'
|
||||||
pkgNameSuffix = 'ru.yagamiproject'
|
pkgNameSuffix = 'ru.yagamiproject'
|
||||||
extClass = '.YagamiProject'
|
extClass = '.YagamiProject'
|
||||||
extVersionCode = 2
|
extVersionCode = 3
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,10 +118,9 @@ class YagamiProject : ParsedHttpSource() {
|
|||||||
chapter.attr("title").isNullOrBlank() -> chapter.text()
|
chapter.attr("title").isNullOrBlank() -> chapter.text()
|
||||||
else -> chapter.attr("title")
|
else -> chapter.attr("title")
|
||||||
}
|
}
|
||||||
|
val numout = name.substringBefore(":").substringAfterLast(" ").substringAfterLast("№")
|
||||||
chapter_number = when {
|
chapter_number = when {
|
||||||
name.contains("Глава") -> name.substringAfter("Глава ").substringBefore(":").toFloat()
|
numout.contains(Regex("^[0-9]+")) -> numout.toFloat()
|
||||||
name.contains("Акт") -> name.substringAfter("Акт").substringBefore(":").replace("№", "").toFloat()
|
|
||||||
else -> 0F
|
else -> 0F
|
||||||
}
|
}
|
||||||
setUrlWithoutDomain(chapter.attr("href"))
|
setUrlWithoutDomain(chapter.attr("href"))
|
||||||
@ -162,7 +161,6 @@ class YagamiProject : ParsedHttpSource() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
Filter.Header("ПРИМЕЧАНИЕ: Фильтры исключают другдруга!"),
|
Filter.Header("ПРИМЕЧАНИЕ: Фильтры исключают другдруга!"),
|
||||||
CategoryList(categoriesName),
|
CategoryList(categoriesName),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user