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 - GmsCore support): Check for availability by adding a patch to add resources without needing to rely on a settings patch #2568

Closed
wants to merge 7 commits into from

Conversation

oSumAtrIX
Copy link
Member

@oSumAtrIX oSumAtrIX commented Dec 30, 2023

About

This PR makes major changes that involve the settings patches. The original idea was to check for the availability of GmsCore in YouTube Music. This required adding strings to YouTube Music. However, because YouTube Music has no settings yet, and the settings patches merged strings, the settings patch had to change so that strings and other resources could be added to apps separately without relying on settings patches. With this change, a new patch called AddResourcesPatch has been introduced, which, as the name suggests, allows adding resources such as strings and arrays to any app. The existing settings and other patches have been refactored accordingly. Because there are a lot of changes, backwards compatibility in the public API can not be guaranteed anymore, which is why this PR introduces a breaking change that will bump the patches from v3 to v4. As two other PRs (#2440, #2541) are related to this one, it may be a good idea to push them to production in a single merge to main. This PR causes merge conflicts in the other two PRs, so reviewing them is a good time.

Notable changes

  • SponsorBlock, RYD and GmsCore have been moved inside ReVanced settings into the respective subscreen
  • A new patch is responsible for handling merging strings and other kinds of resources
  • The settings patches have undergone major refactoring and breaking changes

Todo

The check for GmsCore has been added to YouTube Music, but it fails to open the download link to the browser. I suspect the hooked context is responsible for the issue, but I am unsure. The warning toasts for missing GmsCore is being shown successfully, indicating that the hook is being called properly. Surprisingly, the app does not crash or close gracefully regardless of the hook instructing it to.

RE

…atch to add resources without needing to rely on a settings patch
# Conflicts:
#	src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/HideEmailAddressPatch.kt
@oSumAtrIX
Copy link
Member Author

#2593 will be merged into this one, which is why review will not be required for this PR.

LisoUseInAIKyrios and others added 2 commits January 26, 2024 15:04
…-gmscore

# Conflicts:
#	src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/HideEmailAddressPatch.kt
… localization for strings in mind (#2593)

Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
Co-authored-by: Aunali321 <aunvakil.aa@gmail.com>
@oSumAtrIX
Copy link
Member Author

Superseded by #2440

@oSumAtrIX oSumAtrIX closed this Jan 27, 2024
@oSumAtrIX oSumAtrIX deleted the feat/music-check-for-gmscore branch January 27, 2024 01:03
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.

None yet

2 participants