Skip to content

Commit 5616689

Browse files
chore: Merge branch dev to main (#5857)
2 parents 105f6e0 + b4c695b commit 5616689

File tree

145 files changed

+5530
-2406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+5530
-2406
lines changed

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
# [5.38.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.38.0-dev.4...v5.38.0-dev.5) (2025-09-16)
2+
3+
4+
### Bug Fixes
5+
6+
* **YouTube Music:** Use correct light/dark mode settings UI ([1475643](https://github.com/ReVanced/revanced-patches/commit/1475643f84e9ee4af2ba360a2274001ff1570dad))
7+
8+
# [5.38.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.38.0-dev.3...v5.38.0-dev.4) (2025-09-16)
9+
10+
11+
### Bug Fixes
12+
13+
* **YouTube - Spoof video streams:** Show settings summary if `Force original audio` is enabled ([3776dda](https://github.com/ReVanced/revanced-patches/commit/3776dda710a7780717b7e6f2cdc1333ab67b92fc))
14+
15+
# [5.38.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.38.0-dev.2...v5.38.0-dev.3) (2025-09-16)
16+
17+
18+
### Features
19+
20+
* **YouTube - Spoof video streams:** Add iPadOS client ([2726231](https://github.com/ReVanced/revanced-patches/commit/2726231404384d87f101d825e10a17c944e8f1bd))
21+
22+
# [5.38.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.38.0-dev.1...v5.38.0-dev.2) (2025-09-16)
23+
24+
25+
### Features
26+
27+
* **YouTube Music:** Add `Settings` patch ([#5838](https://github.com/ReVanced/revanced-patches/issues/5838)) ([5e20bd8](https://github.com/ReVanced/revanced-patches/commit/5e20bd80f138d7ca94f18857194c46e489c435dc))
28+
29+
# [5.38.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.37.1-dev.3...v5.38.0-dev.1) (2025-09-15)
30+
31+
32+
### Features
33+
34+
* **Instagram:** Add `Hide explore feed` patch ([#5856](https://github.com/ReVanced/revanced-patches/issues/5856)) ([1d65887](https://github.com/ReVanced/revanced-patches/commit/1d65887e015a067196f5a84db486fff355c96596))
35+
36+
## [5.37.1-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.37.1-dev.2...v5.37.1-dev.3) (2025-09-15)
37+
38+
39+
### Bug Fixes
40+
41+
* **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](https://github.com/ReVanced/revanced-patches/issues/5861)) ([abe3943](https://github.com/ReVanced/revanced-patches/commit/abe3943f98fd86dcd74c7e07cf65d3c7fc24fef9))
42+
43+
## [5.37.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.37.1-dev.1...v5.37.1-dev.2) (2025-09-15)
44+
45+
46+
### Bug Fixes
47+
48+
* **Instagram - Hide navigation buttons:** Support v397.1.0.52.81 ([#5855](https://github.com/ReVanced/revanced-patches/issues/5855)) ([f11d1ef](https://github.com/ReVanced/revanced-patches/commit/f11d1ef9907082512f139d4ab0e2e9f707de7e48))
49+
50+
## [5.37.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.37.0...v5.37.1-dev.1) (2025-09-15)
51+
52+
53+
### Bug Fixes
54+
55+
* **YouTube Music - Spoof video streams:** Fix playback issues when using a cellular network ([fa04c8e](https://github.com/ReVanced/revanced-patches/commit/fa04c8eecfbdd0b6ed082b464ca9032536d71762))
56+
157
# [5.37.0](https://github.com/ReVanced/revanced-patches/compare/v5.36.0...v5.37.0) (2025-09-15)
258

359

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package app.revanced.extension.music.patches;
2+
3+
import app.revanced.extension.music.settings.Settings;
4+
5+
@SuppressWarnings("unused")
6+
public class HideCategoryBarPatch {
7+
8+
/**
9+
* Injection point
10+
*/
11+
public static boolean hideCategoryBar() {
12+
return Settings.HIDE_CATEGORY_BAR.get();
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package app.revanced.extension.music.patches;
2+
3+
import app.revanced.extension.music.settings.Settings;
4+
5+
@SuppressWarnings("unused")
6+
public class HideGetPremiumPatch {
7+
8+
/**
9+
* Injection point
10+
*/
11+
public static boolean hideGetPremiumLabel() {
12+
return Settings.HIDE_GET_PREMIUM_LABEL.get();
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package app.revanced.extension.music.patches;
2+
3+
import app.revanced.extension.music.settings.Settings;
4+
5+
@SuppressWarnings("unused")
6+
public class HideUpgradeButtonPatch {
7+
8+
/**
9+
* Injection point
10+
*/
11+
public static boolean hideUpgradeButton() {
12+
return Settings.HIDE_UPGRADE_BUTTON.get();
13+
}
14+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package app.revanced.extension.music.patches;
2+
3+
import app.revanced.extension.music.settings.Settings;
4+
5+
@SuppressWarnings("unused")
6+
public class HideVideoAdsPatch {
7+
8+
/**
9+
* Injection point
10+
*/
11+
public static boolean showVideoAds(boolean original) {
12+
if (Settings.HIDE_VIDEO_ADS.get()) {
13+
return false;
14+
}
15+
return original;
16+
}
17+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package app.revanced.extension.music.patches;
2+
3+
import app.revanced.extension.music.settings.Settings;
4+
5+
@SuppressWarnings("unused")
6+
public class PermanentRepeatPatch {
7+
8+
/**
9+
* Injection point
10+
*/
11+
public static boolean permanentRepeat() {
12+
return Settings.PERMANENT_REPEAT.get();
13+
}
14+
}

extensions/music/src/main/java/app/revanced/extension/music/patches/spoof/SpoofVideoStreamsPatch.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import static app.revanced.extension.shared.spoof.ClientType.ANDROID_VR_1_43_32;
44
import static app.revanced.extension.shared.spoof.ClientType.ANDROID_VR_1_61_48;
5+
import static app.revanced.extension.shared.spoof.ClientType.VISIONOS;
6+
7+
import java.util.List;
58

69
import app.revanced.extension.shared.spoof.ClientType;
710
import app.revanced.extension.shared.spoof.requests.StreamingDataRequest;
@@ -13,10 +16,11 @@ public class SpoofVideoStreamsPatch {
1316
* Injection point.
1417
*/
1518
public static void setClientOrderToUse() {
16-
ClientType[] availableClients = {
19+
List<ClientType> availableClients = List.of(
1720
ANDROID_VR_1_43_32,
1821
ANDROID_VR_1_61_48,
19-
};
22+
VISIONOS
23+
);
2024

2125
StreamingDataRequest.setClientOrderToUse(availableClients, ANDROID_VR_1_43_32);
2226
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
package app.revanced.extension.music.settings;
2+
3+
import android.app.Activity;
4+
import android.graphics.PorterDuff;
5+
import android.graphics.drawable.Drawable;
6+
import android.preference.PreferenceFragment;
7+
import android.view.View;
8+
9+
import app.revanced.extension.music.settings.preference.ReVancedPreferenceFragment;
10+
import app.revanced.extension.shared.Logger;
11+
import app.revanced.extension.shared.Utils;
12+
import app.revanced.extension.shared.settings.BaseActivityHook;
13+
14+
/**
15+
* Hooks GoogleApiActivity to inject a custom ReVancedPreferenceFragment with a toolbar.
16+
*/
17+
public class GoogleApiActivityHook extends BaseActivityHook {
18+
/**
19+
* Injection point
20+
* <p>
21+
* Creates an instance of GoogleApiActivityHook for use in static initialization.
22+
*/
23+
@SuppressWarnings("unused")
24+
public static GoogleApiActivityHook createInstance() {
25+
// Must touch the Music settings to ensure the class is loaded and
26+
// the values can be found when setting the UI preferences.
27+
// Logging anything under non debug ensures this is set.
28+
Logger.printInfo(() -> "Permanent repeat enabled: " + Settings.PERMANENT_REPEAT.get());
29+
30+
// YT Music always uses dark mode.
31+
Utils.setIsDarkModeEnabled(true);
32+
33+
return new GoogleApiActivityHook();
34+
}
35+
36+
/**
37+
* Sets the fixed theme for the activity.
38+
*/
39+
@Override
40+
protected void customizeActivityTheme(Activity activity) {
41+
// Override the default YouTube Music theme to increase start padding of list items.
42+
// Custom style located in resources/music/values/style.xml
43+
activity.setTheme(Utils.getResourceIdentifier("Theme.ReVanced.YouTubeMusic.Settings", "style"));
44+
}
45+
46+
/**
47+
* Returns the resource ID for the YouTube Music settings layout.
48+
*/
49+
@Override
50+
protected int getContentViewResourceId() {
51+
return Utils.getResourceIdentifier("revanced_music_settings_with_toolbar", "layout");
52+
}
53+
54+
/**
55+
* Returns the fixed background color for the toolbar.
56+
*/
57+
@Override
58+
protected int getToolbarBackgroundColor() {
59+
return Utils.getResourceColor("ytm_color_black");
60+
}
61+
62+
/**
63+
* Returns the navigation icon with a color filter applied.
64+
*/
65+
@Override
66+
protected Drawable getNavigationIcon() {
67+
Drawable navigationIcon = ReVancedPreferenceFragment.getBackButtonDrawable();
68+
navigationIcon.setColorFilter(Utils.getAppForegroundColor(), PorterDuff.Mode.SRC_IN);
69+
return navigationIcon;
70+
}
71+
72+
/**
73+
* Returns the click listener that finishes the activity when the navigation icon is clicked.
74+
*/
75+
@Override
76+
protected View.OnClickListener getNavigationClickListener(Activity activity) {
77+
return view -> activity.finish();
78+
}
79+
80+
/**
81+
* Creates a new ReVancedPreferenceFragment for the activity.
82+
*/
83+
@Override
84+
protected PreferenceFragment createPreferenceFragment() {
85+
return new ReVancedPreferenceFragment();
86+
}
87+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package app.revanced.extension.music.settings;
2+
3+
import static java.lang.Boolean.FALSE;
4+
import static java.lang.Boolean.TRUE;
5+
6+
import app.revanced.extension.shared.settings.BaseSettings;
7+
import app.revanced.extension.shared.settings.BooleanSetting;
8+
9+
public class Settings extends BaseSettings {
10+
11+
// Ads
12+
public static final BooleanSetting HIDE_VIDEO_ADS = new BooleanSetting("revanced_music_hide_video_ads", TRUE, true);
13+
public static final BooleanSetting HIDE_GET_PREMIUM_LABEL = new BooleanSetting("revanced_music_hide_get_premium_label", TRUE, true);
14+
public static final BooleanSetting HIDE_UPGRADE_BUTTON = new BooleanSetting("revanced_music_hide_upgrade_button", TRUE, true);
15+
16+
// General
17+
public static final BooleanSetting HIDE_CATEGORY_BAR = new BooleanSetting("revanced_music_hide_category_bar", FALSE, true);
18+
19+
// Player
20+
public static final BooleanSetting PERMANENT_REPEAT = new BooleanSetting("revanced_music_play_permanent_repeat", FALSE, true);
21+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package app.revanced.extension.music.settings.preference;
2+
3+
import android.widget.Toolbar;
4+
5+
import app.revanced.extension.music.settings.GoogleApiActivityHook;
6+
import app.revanced.extension.shared.Logger;
7+
import app.revanced.extension.shared.Utils;
8+
import app.revanced.extension.shared.settings.preference.ToolbarPreferenceFragment;
9+
10+
/**
11+
* Preference fragment for ReVanced settings.
12+
*/
13+
@SuppressWarnings({"deprecation", "NewApi"})
14+
public class ReVancedPreferenceFragment extends ToolbarPreferenceFragment {
15+
16+
/**
17+
* Initializes the preference fragment.
18+
*/
19+
@Override
20+
protected void initialize() {
21+
super.initialize();
22+
23+
try {
24+
Utils.sortPreferenceGroups(getPreferenceScreen());
25+
setPreferenceScreenToolbar(getPreferenceScreen());
26+
} catch (Exception ex) {
27+
Logger.printException(() -> "initialize failure", ex);
28+
}
29+
}
30+
31+
/**
32+
* Sets toolbar for all nested preference screens.
33+
*/
34+
@Override
35+
protected void customizeToolbar(Toolbar toolbar) {
36+
GoogleApiActivityHook.setToolbarLayoutParams(toolbar);
37+
}
38+
}

0 commit comments

Comments
 (0)