Merge pull request #418 from PhantomShift/patch-1

Fix MangaDex nsfw check
devi 2 years ago committed by GitHub
commit 0fe6fed838
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -110,7 +110,10 @@ internal class MangaDexParser(context: MangaLoaderContext) : MangaParser(context
url = id, url = id,
publicUrl = "https://$domain/title/$id", publicUrl = "https://$domain/title/$id",
rating = RATING_UNKNOWN, rating = RATING_UNKNOWN,
isNsfw = attrs.getStringOrNull("contentRating") == "erotica", isNsfw = when (attrs.getStringOrNull("contentRating")) {
"erotica", "pornographic" -> true
else -> false
},
coverUrl = cover?.plus(".256.jpg").orEmpty(), coverUrl = cover?.plus(".256.jpg").orEmpty(),
largeCoverUrl = cover, largeCoverUrl = cover,
description = attrs.optJSONObject("description")?.selectByLocale(), description = attrs.optJSONObject("description")?.selectByLocale(),

Loading…
Cancel
Save