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

feat(YouTube - Custom Filters): Custom filter whitelist #9

Closed
wants to merge 0 commits into from

Conversation

Francesco146
Copy link
Collaborator

@Francesco146 Francesco146 commented Apr 30, 2024

I'll create this PR for discuss about this feature. Still feeling a bit unsteady about integrations patches.

Do you know a method to debug the integrations runtime patches directly in intellij? currently i don't know any other method to test my code, if not build the apk, install it, set up manually the filters and then test them. thanks!

linked to: anddea/revanced-patches#409

@Francesco146
Copy link
Collaborator Author

@anddea sorry to bother you, can you tell me how do you work with the integrations? like, how do you debug line by line the java files in the integrations? i'm trying to fix this anddea/revanced-patches#363, i hoped it was a simple fix in the resources xml, I need to do this in runtime so i need to modify how the integration work.

I arrived at this portion of code:

https://github.com/anddea/revanced-integrations/blob/467a9542ac4b873901f947fd1b7d6a1f60a692f9/app/src/main/java/app/revanced/integrations/youtube/utils/ResourceHelper.kt#L33C1-L44C6

// file: java/app/revanced/integrations/youtube/utils/ResourceHelper.kt
    @JvmStatic
    fun hidePlayerButton(view: View, original: Int): Int {
        PlayerButton.COLLAPSE.apply {
            if (settings.boolean) {
                for (id in filter) {
                    if (view.id == identifier(id, ResourceType.ID))
                        return 8 // wft is 8??
                }
            }
        }
        return original // why return an int??
    }

but following the call chains i get nowhere, like if all these files aren't used in the root level. can you help me understand wth is going on? thanks xD

if you want, we can chat on Telegram or Discord to have a “faster” conversation

@anddea
Copy link
Owner

anddea commented May 2, 2024

@Francesco146 I contacted you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants