Skip to content

Commit

Permalink
feat(YouTube Music - Hide action bar components): Add `Hide Song / Vi…
Browse files Browse the repository at this point in the history
…deo button` setting (YouTube Music 7.33.51+)
  • Loading branch information
inotia00 authored and anddea committed Feb 11, 2025
1 parent f0fe391 commit 34d5631
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,15 @@ public ActionButtonsFilter() {
Settings.HIDE_ACTION_BUTTON_LIKE_DISLIKE,
"segmented_like_dislike_button.eml"
);
final StringFilterGroup songVideoButton = new StringFilterGroup(
Settings.HIDE_ACTION_BUTTON_SONG_VIDEO,
"music_audio_video_button.eml"
);
addPathCallbacks(
bufferFilterPathRule,
downloadButton,
likeDislikeContainer
likeDislikeContainer,
songVideoButton
);

bufferButtonsGroupList.addAll(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_ACTION_BUTTON_ADD_TO_PLAYLIST = new BooleanSetting("revanced_hide_action_button_add_to_playlist", FALSE, true);
public static final BooleanSetting HIDE_ACTION_BUTTON_DOWNLOAD = new BooleanSetting("revanced_hide_action_button_download", FALSE, true);
public static final BooleanSetting HIDE_ACTION_BUTTON_SHARE = new BooleanSetting("revanced_hide_action_button_share", FALSE, true);
public static final BooleanSetting HIDE_ACTION_BUTTON_SONG_VIDEO = new BooleanSetting("revanced_hide_action_button_song_video", FALSE, true);
public static final BooleanSetting HIDE_ACTION_BUTTON_RADIO = new BooleanSetting("revanced_hide_action_button_radio", FALSE, true);
public static final BooleanSetting HIDE_ACTION_BUTTON_LABEL = new BooleanSetting("revanced_hide_action_button_label", FALSE, true);
public static final BooleanSetting EXTERNAL_DOWNLOADER_ACTION_BUTTON = new BooleanSetting("revanced_external_downloader_action", FALSE, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import app.revanced.patches.music.utils.extension.Constants.COMPONENTS_PATH
import app.revanced.patches.music.utils.patch.PatchList.HIDE_ACTION_BAR_COMPONENTS
import app.revanced.patches.music.utils.playservice.is_7_17_or_greater
import app.revanced.patches.music.utils.playservice.is_7_25_or_greater
import app.revanced.patches.music.utils.playservice.is_7_33_or_greater
import app.revanced.patches.music.utils.playservice.versionCheckPatch
import app.revanced.patches.music.utils.resourceid.likeDislikeContainer
import app.revanced.patches.music.utils.resourceid.sharedResourceIdPatch
Expand Down Expand Up @@ -189,6 +190,13 @@ val actionBarComponentsPatch = bytecodePatch(
"revanced_hide_action_button_radio",
"false"
)
if (is_7_33_or_greater) {
addSwitchPreference(
CategoryType.ACTION_BAR,
"revanced_hide_action_button_song_video",
"false"
)
}
if (!is_7_25_or_greater) {
addSwitchPreference(
CategoryType.ACTION_BAR,
Expand Down

0 comments on commit 34d5631

Please sign in to comment.