Fixed erotica and porn not showing in latest (#9039)

This commit is contained in:
loocool2 2021-09-11 12:03:54 -07:00 committed by GitHub
parent ed01744a4a
commit bc8b461ab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'MangaDex'
pkgNameSuffix = 'all.mangadex'
extClass = '.MangaDexFactory'
extVersionCode = 133
extVersionCode = 134
containsNsfw = true
}

View File

@ -207,6 +207,18 @@ abstract class MangaDex(override val lang: String, val dexLang: String) :
if (preferences.getBoolean(MDConstants.getOriginalLanguageKoreanPref(dexLang), false)) {
addQueryParameter("originalLanguage[]", "ko")
}
if (preferences.getBoolean(MDConstants.getContentRatingSafePrefKey(dexLang), true)) {
addQueryParameter("contentRating[]", "safe")
}
if (preferences.getBoolean(MDConstants.getContentRatingSuggestivePrefKey(dexLang), true)) {
addQueryParameter("contentRating[]", "suggestive")
}
if (preferences.getBoolean(MDConstants.getContentRatingEroticaPrefKey(dexLang), false)) {
addQueryParameter("contentRating[]", "erotica")
}
if (preferences.getBoolean(MDConstants.getContentRatingPornographicPrefKey(dexLang), false)) {
addQueryParameter("contentRating[]", "pornographic")
}
}.build().toString()
return GET(url, headers, CacheControl.FORCE_NETWORK)
}