Madara fix status filter (#1434)
* Madara fix status filter * remove unused override ManhwaClan site seems to be using default madara options 0, 1 etc
This commit is contained in:
parent
cb23787606
commit
7ef3bcd497
|
@ -476,17 +476,17 @@ abstract class Madara(
|
||||||
intl["order_by_filter_new"] to "new-manga",
|
intl["order_by_filter_new"] to "new-manga",
|
||||||
)
|
)
|
||||||
|
|
||||||
protected open val genreConditionFilterOptions: Array<String> =
|
protected open val genreConditionFilterOptions: Map<String, String> =
|
||||||
arrayOf(
|
mapOf(
|
||||||
intl["genre_condition_filter_or"],
|
intl["genre_condition_filter_or"] to "",
|
||||||
intl["genre_condition_filter_and"],
|
intl["genre_condition_filter_and"] to "1",
|
||||||
)
|
)
|
||||||
|
|
||||||
protected open val adultContentFilterOptions: Array<String> =
|
protected open val adultContentFilterOptions: Map<String, String> =
|
||||||
arrayOf(
|
mapOf(
|
||||||
intl["adult_content_filter_all"],
|
intl["adult_content_filter_all"] to "",
|
||||||
intl["adult_content_filter_none"],
|
intl["adult_content_filter_none"] to "0",
|
||||||
intl["adult_content_filter_only"],
|
intl["adult_content_filter_only"] to "1",
|
||||||
)
|
)
|
||||||
|
|
||||||
open class UriPartFilter(displayName: String, private val vals: Array<Pair<String, String>>, state: Int = 0) :
|
open class UriPartFilter(displayName: String, private val vals: Array<Pair<String, String>>, state: Int = 0) :
|
||||||
|
@ -494,7 +494,7 @@ abstract class Madara(
|
||||||
fun toUriPart() = vals[state].second
|
fun toUriPart() = vals[state].second
|
||||||
}
|
}
|
||||||
|
|
||||||
open class Tag(val id: String, name: String) : Filter.CheckBox(name)
|
open class Tag(name: String, val id: String) : Filter.CheckBox(name)
|
||||||
|
|
||||||
protected class AuthorFilter(title: String) : Filter.Text(title)
|
protected class AuthorFilter(title: String) : Filter.Text(title)
|
||||||
protected class ArtistFilter(title: String) : Filter.Text(title)
|
protected class ArtistFilter(title: String) : Filter.Text(title)
|
||||||
|
@ -505,14 +505,14 @@ abstract class Madara(
|
||||||
protected class OrderByFilter(title: String, options: List<Pair<String, String>>, state: Int = 0) :
|
protected class OrderByFilter(title: String, options: List<Pair<String, String>>, state: Int = 0) :
|
||||||
UriPartFilter(title, options.toTypedArray(), state)
|
UriPartFilter(title, options.toTypedArray(), state)
|
||||||
|
|
||||||
protected class GenreConditionFilter(title: String, options: Array<String>) : UriPartFilter(
|
protected class GenreConditionFilter(title: String, options: List<Pair<String, String>>) : UriPartFilter(
|
||||||
title,
|
title,
|
||||||
options.zip(arrayOf("", "1")).toTypedArray(),
|
options.toTypedArray(),
|
||||||
)
|
)
|
||||||
|
|
||||||
protected class AdultContentFilter(title: String, options: Array<String>) : UriPartFilter(
|
protected class AdultContentFilter(title: String, options: List<Pair<String, String>>) : UriPartFilter(
|
||||||
title,
|
title,
|
||||||
options.zip(arrayOf("", "0", "1")).toTypedArray(),
|
options.toTypedArray(),
|
||||||
)
|
)
|
||||||
|
|
||||||
protected class GenreList(title: String, genres: List<Genre>) : Filter.Group<Genre>(title, genres)
|
protected class GenreList(title: String, genres: List<Genre>) : Filter.Group<Genre>(title, genres)
|
||||||
|
@ -531,12 +531,12 @@ abstract class Madara(
|
||||||
),
|
),
|
||||||
OrderByFilter(
|
OrderByFilter(
|
||||||
title = intl["order_by_filter_title"],
|
title = intl["order_by_filter_title"],
|
||||||
options = orderByFilterOptions.map { Pair(it.key, it.value) },
|
options = orderByFilterOptions.toList(),
|
||||||
state = 0,
|
state = 0,
|
||||||
),
|
),
|
||||||
AdultContentFilter(
|
AdultContentFilter(
|
||||||
title = intl["adult_content_filter_title"],
|
title = intl["adult_content_filter_title"],
|
||||||
options = adultContentFilterOptions,
|
options = adultContentFilterOptions.toList(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -546,7 +546,7 @@ abstract class Madara(
|
||||||
Filter.Header(intl["genre_filter_header"]),
|
Filter.Header(intl["genre_filter_header"]),
|
||||||
GenreConditionFilter(
|
GenreConditionFilter(
|
||||||
title = intl["genre_condition_filter_title"],
|
title = intl["genre_condition_filter_title"],
|
||||||
options = genreConditionFilterOptions,
|
options = genreConditionFilterOptions.toList(),
|
||||||
),
|
),
|
||||||
GenreList(
|
GenreList(
|
||||||
title = intl["genre_filter_title"],
|
title = intl["genre_filter_title"],
|
||||||
|
@ -712,8 +712,8 @@ abstract class Madara(
|
||||||
document.selectFirst(altNameSelector)?.ownText()?.let {
|
document.selectFirst(altNameSelector)?.ownText()?.let {
|
||||||
if (it.isBlank().not() && it.notUpdating()) {
|
if (it.isBlank().not() && it.notUpdating()) {
|
||||||
manga.description = when {
|
manga.description = when {
|
||||||
manga.description.isNullOrBlank() -> "$altName " + it
|
manga.description.isNullOrBlank() -> "$altName $it"
|
||||||
else -> manga.description + "\n\n$altName " + it
|
else -> "${manga.description}\n\n$altName $it"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ ext {
|
||||||
extClass = '.ManhwaClan'
|
extClass = '.ManhwaClan'
|
||||||
themePkg = 'madara'
|
themePkg = 'madara'
|
||||||
baseUrl = 'https://manhwaclan.com'
|
baseUrl = 'https://manhwaclan.com'
|
||||||
overrideVersionCode = 0
|
overrideVersionCode = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -2,7 +2,4 @@ package eu.kanade.tachiyomi.extension.en.manhwaclan
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
|
||||||
class ManhwaClan : Madara("ManhwaClan", "https://manhwaclan.com", "en") {
|
class ManhwaClan : Madara("ManhwaClan", "https://manhwaclan.com", "en")
|
||||||
// sfw content marked as nsfw (no nsfw content on the site yet)
|
|
||||||
override val adultContentFilterOptions: Array<String> = arrayOf("All", "Only", "None")
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue