-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read Mangas: Fix description #7249
base: main
Are you sure you want to change the base?
Conversation
thumbnail_url = document.selectFirst("img.w-full")?.absUrl("src") | ||
|
||
genre = document.select("div > label + div > div").joinToString { it.text() } | ||
|
||
description = document.select("script").map { it.data() } | ||
.firstOrNull { MANGA_DETAILS_DESCRIPTION_REGEX.containsMatchIn(it) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need this regex to just check if it contains description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it does need to, because there are multiple script elements inside the document, and we need to find the one that contains the description within.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it does need to, because there are multiple script elements inside the document, and we need to find the one that contains the description within.
You can use
.firstOrNull { it.contains("description\":\"", ignoreCase = true) }
or
.firstOrNull { it.contains("description", ignoreCase = true) }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it does need to, because there are multiple script elements inside the document, and we need to find the one that contains the description within.
You can use
.firstOrNull { it.contains("description\":\"", ignoreCase = true) }or
.firstOrNull { it.contains("description", ignoreCase = true) }
I'll test it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@choppeh It worked, ty. Fix it.
fe20920
to
454e15f
Compare
Closes #7248
Checklist:
extVersionCode
value inbuild.gradle
for individual extensionsoverrideVersionCode
orbaseVersionCode
as needed for all multisrc extensionsisNsfw = true
flag inbuild.gradle
when appropriateid
if a source's name or language were changedweb_hi_res_512.png
when adding a new extension