Madara: fix lateinit not initialized for some source (#14228)
* Madara: fix lateinit not initialized - check if initialized * Update multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com> Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
This commit is contained in:
parent
61b063a7c0
commit
0a9555c292
|
@ -665,6 +665,12 @@ abstract class Madara(
|
||||||
.toMutableSet()
|
.toMutableSet()
|
||||||
|
|
||||||
// add tag(s) to genre
|
// add tag(s) to genre
|
||||||
|
val mangaTitle = try {
|
||||||
|
manga.title
|
||||||
|
} catch (_: UninitializedPropertyAccessException) {
|
||||||
|
"not initialized"
|
||||||
|
}
|
||||||
|
|
||||||
if (mangaDetailsSelectorTag.isNotEmpty()) {
|
if (mangaDetailsSelectorTag.isNotEmpty()) {
|
||||||
select(mangaDetailsSelectorTag).forEach { element ->
|
select(mangaDetailsSelectorTag).forEach { element ->
|
||||||
if (genres.contains(element.text()).not() &&
|
if (genres.contains(element.text()).not() &&
|
||||||
|
@ -672,7 +678,7 @@ abstract class Madara(
|
||||||
element.text().contains("read", true).not() &&
|
element.text().contains("read", true).not() &&
|
||||||
element.text().contains(name, true).not() &&
|
element.text().contains(name, true).not() &&
|
||||||
element.text().contains(name.replace(" ", ""), true).not() &&
|
element.text().contains(name.replace(" ", ""), true).not() &&
|
||||||
element.text().contains(manga.title, true).not() &&
|
element.text().contains(mangaTitle, true).not() &&
|
||||||
element.text().contains(altName, true).not()
|
element.text().contains(altName, true).not()
|
||||||
) {
|
) {
|
||||||
genres.add(element.text().lowercase(Locale.ROOT))
|
genres.add(element.text().lowercase(Locale.ROOT))
|
||||||
|
|
|
@ -10,7 +10,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
override val themeClass = "Madara"
|
override val themeClass = "Madara"
|
||||||
|
|
||||||
override val baseVersionCode: Int = 25
|
override val baseVersionCode: Int = 26
|
||||||
|
|
||||||
override val sources = listOf(
|
override val sources = listOf(
|
||||||
MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 13),
|
MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 13),
|
||||||
|
|
Loading…
Reference in New Issue