mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-01 23:24:28 +02:00
add hide-music-button
patch
This commit is contained in:
parent
0a96463b5a
commit
d22c96fbff
@ -0,0 +1,44 @@
|
||||
package app.revanced.patches.youtube.layout.player.musicbutton.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.misc.playerbutton.patch.PlayerButtonPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
|
||||
@Patch
|
||||
@Name("hide-music-button")
|
||||
@Description("Hides the YouTube Music button in the video player.")
|
||||
@DependsOn(
|
||||
[
|
||||
PlayerButtonPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideMusicButtonPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
|
||||
/*
|
||||
* Add settings
|
||||
*/
|
||||
SettingsPatch.addPreference(
|
||||
arrayOf(
|
||||
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
|
||||
"SETTINGS: HIDE_YOUTUBE_MUSIC_BUTTON"
|
||||
)
|
||||
)
|
||||
|
||||
SettingsPatch.updatePatchStatus("hide-music-button")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
@ -435,6 +435,9 @@ Is it ready to submit?"</string>
|
||||
<string name="revanced_hide_time_stamp_summary_off">Time stamp is shown</string>
|
||||
<string name="revanced_hide_time_stamp_summary_on">Time stamp is hidden</string>
|
||||
<string name="revanced_hide_time_stamp_title">Hide time stamp</string>
|
||||
<string name="revanced_hide_youtube_music_button_summary_off">YouTube Music button is shown</string>
|
||||
<string name="revanced_hide_youtube_music_button_summary_on">YouTube Music button is hidden</string>
|
||||
<string name="revanced_hide_youtube_music_button_title">Hide youtube music button</string>
|
||||
<string name="revanced_import_settings_summary">Fetch ReVanced settings from saved file</string>
|
||||
<string name="revanced_import_settings_title">Import settings</string>
|
||||
<string name="revanced_misc">Miscellaneous</string>
|
||||
|
@ -148,6 +148,9 @@
|
||||
<!-- SETTINGS: HIDE_COLLAPSE_BUTTON
|
||||
<SwitchPreference android:title="@string/revanced_hide_collapse_button_title" android:key="revanced_hide_collapse_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_collapse_button_summary_on" android:summaryOff="@string/revanced_hide_collapse_button_summary_off" />SETTINGS: HIDE_COLLAPSE_BUTTON -->
|
||||
|
||||
<!-- SETTINGS: HIDE_YOUTUBE_MUSIC_BUTTON
|
||||
<SwitchPreference android:title="@string/revanced_hide_youtube_music_button_title" android:key="revanced_hide_youtube_music_button" android:defaultValue="false" android:summaryOn="@string/revanced_hide_youtube_music_button_summary_on" android:summaryOff="@string/revanced_hide_youtube_music_button_summary_off" />SETTINGS: HIDE_YOUTUBE_MUSIC_BUTTON -->
|
||||
|
||||
<!-- SETTINGS: HIDE_AUTOPLAY_BUTTON
|
||||
<SwitchPreference android:title="@string/revanced_hide_autoplay_button_title" android:key="revanced_hide_autoplay_button" android:defaultValue="true" android:summaryOn="@string/revanced_hide_autoplay_button_summary_on" android:summaryOff="@string/revanced_hide_autoplay_button_summary_off" />SETTINGS: HIDE_AUTOPLAY_BUTTON -->
|
||||
|
||||
@ -404,6 +407,7 @@
|
||||
|
||||
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_player_layout" />
|
||||
<Preference android:title="hide-collapse-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-music-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-autoplay-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-cast-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-live-chat-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user