Skip to content

Conversation

MarcaDian
Copy link
Contributor

@MarcaDian MarcaDian commented Sep 14, 2025

Adds settings to YouTube Music.

A continuation and completion of #2708

@oSumAtrIX oSumAtrIX self-requested a review September 14, 2025 15:30
@oSumAtrIX oSumAtrIX changed the title feat(YouTube Music): Add Settings patch feat(YouTube Music): Add ´Settings´ patch Sep 14, 2025
@oSumAtrIX oSumAtrIX changed the title feat(YouTube Music): Add ´Settings´ patch feat(YouTube Music): Add Settings patch Sep 14, 2025
@MarcaDian
Copy link
Contributor Author

I just made a working version of the settings because the question of music settings came up #5813 (comment) , #2708 (comment).

I'm not very knowledgeable about such things, especially when the abstraction affects important components.

@oSumAtrIX
Copy link
Member

Abstraction means you should reuse existing code by creating a base function that you call everywhere you need. Or you use the existing one. See the YouTube settings patch as reference

@LisoUseInAIKyrios
Copy link
Contributor

I'm surprised this works with changes to only 10 files.

At first glance it looks like there's a small amount of code duplication, but that should be easy to consolidate.

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Sep 14, 2025

A little later I will implement an abstract class for the toolbar.

But with bytecode it's not up to me)

@MarcaDian
Copy link
Contributor Author

Some changes will probably break something in #5806, but after it's merged we can also easily add search in the music settings, although there will probably be few settings there.

@oSumAtrIX
Copy link
Member

Abstraction should automatically handle this. If you reuse the code, then if you implement the settings patch for music, it will inherit the code for search. If you dont want it to appear dynamically you can add an if (settings.count < X) check or control it by a super class/function parameter

@MarcaDian
Copy link
Contributor Author

Search is not abstract now.

In order not to do two meaningless jobs, must first merge PR with search, and adapt it to music, or vice versa, first merge music settings, and then adapt search PR.

@LisoUseInAIKyrios
Copy link
Contributor

Lets merge this first because it's simpler.

I don't think search is needed for YT Music because it's going to be like 5 settings (currently only 1 exists).

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Sep 15, 2025

Although, maybe merge the other first because it's basically ready.

This needs to add at least a few settings and optionally an about screen to make it complete.

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Sep 15, 2025

Can we use existing strings from YouTube or do need to create our own for the music?

Edit: Although this probably won't work due to the implementation of adding strings via the app id.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Sep 15, 2025

The app id is just a string.
There already is a shared string bundle, and settings strings can go there.

<patch id="misc.settings.settingsResourcePatch">

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Sep 15, 2025

I spoke about ads strings for example.

Nevermind, I've already made a settings template. But I'll need help filling it out.

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Sep 15, 2025

My English is not very good, so please correct me.

Screenshot_2025-09-15-15-11-12-492_app.revanced.android.apps.youtube.music.jpg

Screenshot_2025-09-15-15-11-21-222_app.revanced.android.apps.youtube.music.jpg

Screenshot_2025-09-15-15-11-16-842_app.revanced.android.apps.youtube.music.jpg

Screenshot_2025-09-15-15-11-23-945_app.revanced.android.apps.youtube.music.jpg

Screenshot_2025-09-15-15-11-25-819_app.revanced.android.apps.youtube.music.jpg

@ILoveOpenSourceApplications
Copy link
Contributor

Screenshot_2025-09-15-15-11-12-492_app.revanced.android.apps.youtube.music.jpg

Oh hell nah, not the gray separators!. Please do remove them.

@MarcaDian
Copy link
Contributor Author

Oh hell nah, not the gray separators!. Please do remove them.

This is not so important yet, but if you noticed, they are also in the regular settings.

These settings are still copying the standard ones. I still don't understand why such a popular app has such outdated code in the settings.

@ILoveOpenSourceApplications
Copy link
Contributor

This is not so important yet, but if you noticed, they are also in the regular settings.

It's not there atleast in the main menu for now.

These settings are still copying the standard ones. I still don't understand why such a popular app has such outdated code in the settings.

I agree. Maybe a theme option in the future can address this issue and remove them or change the theme perhaps.

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Sep 15, 2025

I don't think there's anything to test here, everything is working as it should for now.

By the way, I thought there would be an option in the settings to change video stream clients?

@LisoUseInAIKyrios
Copy link
Contributor

Yeah can add a spoof stream client type, even though there isn't a good reason to change it.

Can merge today/tomorrow then.

@MarcaDian

This comment was marked as resolved.

@LisoUseInAIKyrios
Copy link
Contributor

Ready to merge?

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Sep 16, 2025

Does this have to be lowercase?
So I googled it and it's correct.

Otherwise ok.

Screenshot_2025-09-16-09-44-04-784_app.revanced.android.apps.youtube.music.jpg

@LisoUseInAIKyrios LisoUseInAIKyrios merged commit 5e20bd8 into ReVanced:dev Sep 16, 2025
1 check passed
github-actions bot pushed a commit that referenced this pull request Sep 16, 2025
# [5.38.0-dev.2](v5.38.0-dev.1...v5.38.0-dev.2) (2025-09-16)

### Features

* **YouTube Music:** Add `Settings` patch ([#5838](#5838)) ([5e20bd8](5e20bd8))
@LisoUseInAIKyrios LisoUseInAIKyrios changed the title feat(YouTube Music): Add Settings patch feat(YouTube Music): Add in app settings Sep 16, 2025
@MarcaDian MarcaDian deleted the music-settings branch September 16, 2025 07:06
@LisoUseInAIKyrios LisoUseInAIKyrios changed the title feat(YouTube Music): Add in app settings feat(YouTube Music): Add in app settings menu Sep 16, 2025
@LisoUseInAIKyrios

This comment was marked as resolved.

@MarcaDian

This comment was marked as resolved.

@oSumAtrIX

This comment was marked as resolved.

@LisoUseInAIKyrios

This comment was marked as resolved.

@MarcaDian

This comment was marked as resolved.

@LisoUseInAIKyrios

This comment was marked as resolved.

@LisoUseInAIKyrios

This comment was marked as resolved.

@MarcaDian

This comment was marked as resolved.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Sep 16, 2025

It would be ideal if there's a ReVanced language setting like YT. The strings and setting are already shared, but it needs a patch change similar YT so the ReVanced modified context is used for the settings UI.

// Add attachBaseContext method to override the context for setting a specific language.

But that can wait until later, especially since there's so few settings and the translations have improved a lot.

github-actions bot pushed a commit that referenced this pull request Sep 16, 2025
# [5.38.0](v5.37.0...v5.38.0) (2025-09-16)

### Bug Fixes

* **Instagram - Hide navigation buttons:** Support v397.1.0.52.81 ([#5855](#5855)) ([f11d1ef](f11d1ef))
* **Spoof video streams:** Remove Android TV and iOS TV clients, add experimental VisionOS, add temporary fix for `Force original audio` to work with any spoof client ([#5861](#5861)) ([abe3943](abe3943))
* **YouTube - Spoof video streams:** Show settings summary if `Force original audio` is enabled ([3776dda](3776dda))
* **YouTube Music - Spoof video streams:** Fix playback issues when using a cellular network ([fa04c8e](fa04c8e))
* **YouTube Music:** Use correct light/dark mode settings UI ([1475643](1475643))

### Features

* **Instagram:** Add `Hide explore feed` patch ([#5856](#5856)) ([1d65887](1d65887))
* **YouTube - Spoof video streams:** Add iPadOS client ([2726231](2726231))
* **YouTube Music:** Add `Settings` patch ([#5838](#5838)) ([5e20bd8](5e20bd8))
@MarcaDian
Copy link
Contributor Author

The only thing I want to see in Music right now is a setting to hide the Cast button. Now can try to add that.

Maybe with the implementation of settings in Music, more devs will start supporting this product.

It seems to me that YouTube Music is being unfairly ignored for now.

MarkusTieger pushed a commit to MarkusTieger/revanced-patches that referenced this pull request Sep 18, 2025
MarkusTieger pushed a commit to MarkusTieger/revanced-patches that referenced this pull request Sep 18, 2025
# [5.38.0-dev.2](ReVanced/revanced-patches@v5.38.0-dev.1...v5.38.0-dev.2) (2025-09-16)

### Features

* **YouTube Music:** Add `Settings` patch ([ReVanced#5838](ReVanced#5838)) ([5e20bd8](ReVanced@5e20bd8))
MarkusTieger pushed a commit to MarkusTieger/revanced-patches that referenced this pull request Sep 18, 2025
# [5.38.0](ReVanced/revanced-patches@v5.37.0...v5.38.0) (2025-09-16)

### Bug Fixes

* **Instagram - Hide navigation buttons:** Support v397.1.0.52.81 ([ReVanced#5855](ReVanced#5855)) ([f11d1ef](ReVanced@f11d1ef))
* **Spoof video streams:** Remove Android TV and iOS TV clients, add experimental VisionOS, add temporary fix for `Force original audio` to work with any spoof client ([ReVanced#5861](ReVanced#5861)) ([abe3943](ReVanced@abe3943))
* **YouTube - Spoof video streams:** Show settings summary if `Force original audio` is enabled ([3776dda](ReVanced@3776dda))
* **YouTube Music - Spoof video streams:** Fix playback issues when using a cellular network ([fa04c8e](ReVanced@fa04c8e))
* **YouTube Music:** Use correct light/dark mode settings UI ([1475643](ReVanced@1475643))

### Features

* **Instagram:** Add `Hide explore feed` patch ([ReVanced#5856](ReVanced#5856)) ([1d65887](ReVanced@1d65887))
* **YouTube - Spoof video streams:** Add iPadOS client ([2726231](ReVanced@2726231))
* **YouTube Music:** Add `Settings` patch ([ReVanced#5838](ReVanced#5838)) ([5e20bd8](ReVanced@5e20bd8))
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.

4 participants