feat(YouTube Music - Hide action bar components): Add Hide Song / Video button setting (YouTube Music 7.33.51+)

This commit is contained in:
inotia00 2025-02-10 17:30:10 +09:00
parent a23944945f
commit 4531187418
4 changed files with 18 additions and 1 deletions

View File

@ -35,10 +35,15 @@ public final class ActionButtonsFilter extends Filter {
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(

View File

@ -39,6 +39,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);

View File

@ -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
@ -223,6 +224,13 @@ val actionBarComponentsPatch = bytecodePatch(
"revanced_hide_action_button_share",
"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,

View File

@ -40,6 +40,9 @@
<string name="revanced_hide_action_button_radio_summary">Hides the Radio button.</string>
<string name="revanced_hide_action_button_share_title">Hide Share button</string>
<string name="revanced_hide_action_button_share_summary">Hides the Share button.</string>
<string name="revanced_hide_action_button_song_video_title">Hide Song / Video button</string>
<string name="revanced_hide_action_button_song_video_summary">"Hides the Song / Video button.
(This button is only available to some users)"</string>
<string name="revanced_hide_action_button_label_title">Hide action button labels</string>
<string name="revanced_hide_action_button_label_summary">Hides the labels of the action buttons.</string>
<string name="revanced_external_downloader_action_title">Override Download action button</string>