From 8732a84422087fca7e9e1635a0b1d8d2cbf034f4 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 24 May 2023 21:31:36 +0200 Subject: [PATCH] fix(youtube/remove-player-controls-background): use correct patch name and description --- .../PlayerControlsBackgroundCompatibility.kt} | 4 ++-- .../patch/PlayerControlsBackgroundPatch.kt} | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) rename src/main/kotlin/app/revanced/patches/youtube/layout/{buttons/player/background/annotations/PlayerButtonBackgroundCompatibility.kt => player/background/annotations/PlayerControlsBackgroundCompatibility.kt} (60%) rename src/main/kotlin/app/revanced/patches/youtube/layout/{buttons/player/background/patch/PlayerButtonBackgroundPatch.kt => player/background/patch/PlayerControlsBackgroundPatch.kt} (73%) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/background/annotations/PlayerButtonBackgroundCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/annotations/PlayerControlsBackgroundCompatibility.kt similarity index 60% rename from src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/background/annotations/PlayerButtonBackgroundCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/layout/player/background/annotations/PlayerControlsBackgroundCompatibility.kt index a939d9b7e..ac2062c55 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/background/annotations/PlayerButtonBackgroundCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/annotations/PlayerControlsBackgroundCompatibility.kt @@ -1,7 +1,7 @@ -package app.revanced.patches.youtube.layout.buttons.player.background.annotations +package app.revanced.patches.youtube.layout.player.background.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package @Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35"))]) @Target(AnnotationTarget.CLASS) -internal annotation class PlayerButtonBackgroundCompatibility +internal annotation class PlayerControlsBackgroundCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/background/patch/PlayerButtonBackgroundPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/patch/PlayerControlsBackgroundPatch.kt similarity index 73% rename from src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/background/patch/PlayerButtonBackgroundPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/layout/player/background/patch/PlayerControlsBackgroundPatch.kt index ead1c8658..ef8ecfbbb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/background/patch/PlayerButtonBackgroundPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/patch/PlayerControlsBackgroundPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.layout.buttons.player.background.patch +package app.revanced.patches.youtube.layout.player.background.patch import app.revanced.extensions.doRecursively import app.revanced.patcher.annotation.Description @@ -9,15 +9,15 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.youtube.layout.buttons.player.background.annotations.PlayerButtonBackgroundCompatibility +import app.revanced.patches.youtube.layout.player.background.annotations.PlayerControlsBackgroundCompatibility import org.w3c.dom.Element @Patch(false) -@Name("remove-player-button-background") -@Description("Removes the background from the video player buttons.") -@PlayerButtonBackgroundCompatibility +@Name("remove-player-controls-background") +@Description("Removes the background from the video player controls.") +@PlayerControlsBackgroundCompatibility @Version("0.0.1") -class PlayerButtonBackgroundPatch : ResourcePatch { +class PlayerControlsBackgroundPatch : ResourcePatch { override fun execute(context: ResourceContext): PatchResult { context.xmlEditor[RESOURCE_FILE_PATH].use { editor -> editor.file.doRecursively node@{ node ->