diff --git a/src/main/kotlin/app/revanced/patches/music/layout/carouselshelf/patch/HideCarouselShelfPatch.kt b/src/main/kotlin/app/revanced/patches/music/layout/carouselshelf/patch/HideCarouselShelfPatch.kt new file mode 100644 index 000000000..aa3e13761 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/music/layout/carouselshelf/patch/HideCarouselShelfPatch.kt @@ -0,0 +1,35 @@ +package app.revanced.patches.music.layout.carouselshelf.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.resource.patch.MusicSettingsPatch +import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility +import app.revanced.util.enum.CategoryType + +@Patch +@Name("hide-carousel-shelf") +@Description("Hides the carousel shelf from homepage and explorer.") +@DependsOn( + [ + MusicLithoFilterPatch::class, + MusicSettingsPatch::class + ] +) +@YouTubeMusicCompatibility +@Version("0.0.1") +class HideCarouselShelfPatch : BytecodePatch() { + override fun execute(context: BytecodeContext): PatchResult { + + MusicSettingsPatch.addMusicPreference(CategoryType.LAYOUT, "revanced_hide_carousel_shelf", "false") + + return PatchResultSuccess() + } +}