Comick tags filter fix (#2543)
* Fixed Tags Fixed tags search that contains space and slash. * Update build.gradle * Fixed Tags Filter Fixed: Uppercase -> lowercase. Single quotation marks * Taking out the regex object Taking out the regex object so it doesn't get created every time
This commit is contained in:
parent
22469d8a51
commit
8e9e4f02f6
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Comick'
|
extName = 'Comick'
|
||||||
extClass = '.ComickFactory'
|
extClass = '.ComickFactory'
|
||||||
extVersionCode = 42
|
extVersionCode = 43
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ abstract class Comick(
|
||||||
is TagFilter -> {
|
is TagFilter -> {
|
||||||
if (it.state.isNotEmpty()) {
|
if (it.state.isNotEmpty()) {
|
||||||
it.state.split(",").forEach {
|
it.state.split(",").forEach {
|
||||||
addQueryParameter("tags", it.trim())
|
addQueryParameter("tags", it.trim().lowercase().replace(SPACE_AND_SLASH_REGEX, "-").replace("'-", "-and-039-").replace("'", "-and-039-"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -453,6 +453,7 @@ abstract class Comick(
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val SLUG_SEARCH_PREFIX = "id:"
|
const val SLUG_SEARCH_PREFIX = "id:"
|
||||||
|
private val SPACE_AND_SLASH_REGEX = Regex("[ /]")
|
||||||
private const val IGNORED_GROUPS_PREF = "IgnoredGroups"
|
private const val IGNORED_GROUPS_PREF = "IgnoredGroups"
|
||||||
private const val INCLUDE_MU_TAGS_PREF = "IncludeMangaUpdatesTags"
|
private const val INCLUDE_MU_TAGS_PREF = "IncludeMangaUpdatesTags"
|
||||||
private const val INCLUDE_MU_TAGS_DEFAULT = false
|
private const val INCLUDE_MU_TAGS_DEFAULT = false
|
||||||
|
|
Loading…
Reference in New Issue