mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 21:27:43 +02:00
add hide-playlist-card
patch
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.music.ad.video.patch
|
||||
package app.revanced.patches.music.ads.video.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
@ -9,6 +9,7 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.misc.litho.patch.MusicLithoFilterPatch
|
||||
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||
import app.revanced.patches.shared.patch.videoads.GeneralVideoAdsPatch
|
||||
@ -20,6 +21,7 @@ import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH
|
||||
@DependsOn(
|
||||
[
|
||||
GeneralVideoAdsPatch::class,
|
||||
MusicLithoFilterPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
]
|
||||
)
|
@ -0,0 +1,34 @@
|
||||
package app.revanced.patches.music.layout.playlistcard.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.misc.litho.patch.MusicLithoFilterPatch
|
||||
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||
|
||||
@Patch
|
||||
@Name("hide-playlist-card")
|
||||
@Description("Hides the recommand playlist card from home feed.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicLithoFilterPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeMusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class HidePlaylistCardPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
MusicSettingsPatch.addMusicPreference("navigation", "revanced_hide_playlist_card", "true")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package app.revanced.patches.music.misc.litho.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||
import app.revanced.patches.shared.patch.litho.AbstractLithoFilterPatch
|
||||
import app.revanced.util.integrations.Constants.ADS_PATH
|
||||
|
||||
@YouTubeMusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MusicLithoFilterPatch : AbstractLithoFilterPatch(
|
||||
"$ADS_PATH/MusicLithoFilterPatch;"
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
super.execute(context)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user