Skip to content

Commit 3c4703a

Browse files
authored
chore: Merge branch dev to main (#5414)
2 parents fc19fe7 + 2454c02 commit 3c4703a

File tree

6 files changed

+19
-11
lines changed

6 files changed

+19
-11
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [5.31.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.31.0...v5.31.1-dev.1) (2025-07-11)
2+
3+
4+
### Bug Fixes
5+
6+
* **Spotify - Unlock Premium:** Fix hiding context menu ads for latest version ([#5415](https://github.com/ReVanced/revanced-patches/issues/5415)) ([dcde393](https://github.com/ReVanced/revanced-patches/commit/dcde3935bde3172576d0f9f5ff9eb62ecfff7dfe))
7+
18
# [5.31.0](https://github.com/ReVanced/revanced-patches/compare/v5.30.0...v5.31.0) (2025-07-11)
29

310

extensions/spotify/src/main/java/app/revanced/extension/spotify/misc/UnlockPremiumPatch.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ private static class OverrideAttribute {
9797
*/
9898
private static final List<List<ComponentFilter>> CONTEXT_MENU_ITEMS_COMPONENT_FILTERS = List.of(
9999
// "Listen to music ad-free" upsell on playlists.
100-
List.of(new ResourceIdComponentFilter("context_menu_remove_ads", "id")),
100+
List.of(new ResourceIdComponentFilter("context_menu_remove_ads", "string")),
101101
// "Listen to music ad-free" upsell on albums.
102-
List.of(new ResourceIdComponentFilter("playlist_entity_reinventfree_adsfree_context_menu_item", "id")),
102+
List.of(new ResourceIdComponentFilter("playlist_entity_reinventfree_adsfree_context_menu_item", "string")),
103103
// "Start a Jam" context menu item, but only filtered if the user does not have premium and the item is
104104
// being used as a Premium upsell (ad).
105105
List.of(
106-
new ResourceIdComponentFilter("group_session_context_menu_start", "id"),
106+
new ResourceIdComponentFilter("group_session_context_menu_start", "string"),
107107
new StringComponentFilter("isPremiumUpsell=true")
108108
)
109109
);
@@ -227,7 +227,8 @@ public static boolean isFilteredContextMenuItem(Object contextMenuItem) {
227227
if (componentFilter.filterUnavailable()) {
228228
Logger.printInfo(() -> "isFilteredContextMenuItem: Filter " +
229229
componentFilter.getFilterRepresentation() + " not available, skipping");
230-
continue;
230+
allMatch = false;
231+
break;
231232
}
232233

233234
if (!stringifiedContextMenuItem.contains(componentFilter.getFilterValue())) {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
33
org.gradle.parallel = true
44
android.useAndroidX = true
55
kotlin.code.style = official
6-
version = 5.31.0
6+
version = 5.31.1-dev.1

patches/src/main/kotlin/app/revanced/patches/spotify/misc/Fingerprints.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ internal val contextMenuViewModelConstructorFingerprint = fingerprint {
4949
/**
5050
* Used to find the interface name of a context menu item.
5151
*/
52-
internal val browsePodcastsContextMenuItemClassFingerprint = fingerprint {
53-
strings("browse_podcast_item", "ui_navigate")
52+
internal val removeAdsContextMenuItemClassFingerprint = fingerprint {
53+
strings("remove_ads_item", "ui_navigate")
5454
}
5555

5656
internal const val CONTEXT_MENU_ITEM_CLASS_DESCRIPTOR_PLACEHOLDER = "Lapp/revanced/ContextMenuItemPlaceholder;"

patches/src/main/kotlin/app/revanced/patches/spotify/misc/UnlockPremiumPatch.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ val unlockPremiumPatch = bytecodePatch(
161161
// minified names used at runtime. The instructions need to match the original names so we can call the
162162
// method in the extension.
163163
extensionFilterContextMenuItemsFingerprint.method.apply {
164-
val contextMenuItemInterfaceClassDef = browsePodcastsContextMenuItemClassFingerprint
164+
val contextMenuItemInterfaceClassDef = removeAdsContextMenuItemClassFingerprint
165165
.originalClassDef
166166
.interfaces
167167
.firstOrNull()

patches/src/main/resources/addresources/values/strings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,9 @@ To show the Audio track menu, change \'Spoof video streams\' to iOS TV"</string>
765765
<string name="revanced_hide_cast_button_title">Hide Cast button</string>
766766
<string name="revanced_hide_cast_button_summary_on">Cast button is hidden</string>
767767
<string name="revanced_hide_cast_button_summary_off">Cast button is shown</string>
768-
<string name="revanced_hide_player_control_buttons_background_title">Hide player control buttons background</string>
769-
<string name="revanced_hide_player_control_buttons_background_summary_on">Player control buttons background is hidden</string>
770-
<string name="revanced_hide_player_control_buttons_background_summary_off">Player control buttons background is shown</string>
768+
<string name="revanced_hide_player_control_buttons_background_title">Hide player controls background</string>
769+
<string name="revanced_hide_player_control_buttons_background_summary_on">Player controls background is hidden</string>
770+
<string name="revanced_hide_player_control_buttons_background_summary_off">Player controls background is shown</string>
771771
<string name="revanced_hide_player_previous_next_buttons_title">Hide Previous &amp; Next buttons</string>
772772
<string name="revanced_hide_player_previous_next_buttons_summary_on">Buttons are hidden</string>
773773
<string name="revanced_hide_player_previous_next_buttons_summary_off">Buttons are shown</string>

0 commit comments

Comments
 (0)