Skip to content
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

Add Novelfull #6823

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Add Novelfull #6823

wants to merge 8 commits into from

Conversation

FunnyTiming
Copy link
Contributor

@FunnyTiming FunnyTiming commented Dec 26, 2024

Checklist:

  • Updated overrideVersionCode or baseVersionCode as needed for all multisrc extensions
  • Referenced all related issues in the PR body (e.g. "Closes #xyz")
  • Added the isNsfw = true flag in build.gradle when appropriate
  • Have tested the modifications by compiling and running the extension through Android Studio
  • Have removed web_hi_res_512.png when adding a new extension

Close #4486

@FunnyTiming FunnyTiming marked this pull request as ready for review December 29, 2024 20:37
SelectFilterOption("爱情", "530"),
),
)
// TODO: Automate this
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need help here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could maybe have a list of tripple and build the list based on language/index.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure for multiple languages, but you can use the selector: ul.nav > li:has(> a:containsOwn(Genre)) ul > li
with that you can get id and name kinda like this:

allGenres["en"] = document.select("ul.nav > li:has(> a:containsOwn(Genre)) ul > li > a").mapNotNull { element ->
    val url = element.absUrl("href").toHttpUrlOrNull()
    val id = url?.queryParameter("id")
    id?.let { SelectFilterOption(element.ownText(), it) }
}

(code can be considered pseudo code)

Copy link
Contributor Author

@FunnyTiming FunnyTiming Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something called when the settings are called for the first time ? I remember to see a message like "Click on [Reset] to load genres" but I have no memories of this source, nor the function who is called.
OK I will check Mihon sources

@FunnyTiming FunnyTiming changed the title Add mangafre Add Novelfull Dec 29, 2024
SelectFilterOption("爱情", "530"),
),
)
// TODO: Automate this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure for multiple languages, but you can use the selector: ul.nav > li:has(> a:containsOwn(Genre)) ul > li
with that you can get id and name kinda like this:

allGenres["en"] = document.select("ul.nav > li:has(> a:containsOwn(Genre)) ul > li > a").mapNotNull { element ->
    val url = element.absUrl("href").toHttpUrlOrNull()
    val id = url?.queryParameter("id")
    id?.let { SelectFilterOption(element.ownText(), it) }
}

(code can be considered pseudo code)

Co-authored-by: Vetle Ledaal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Novelfulll (mangafre)
3 participants