diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/playertype/PlayerTypeHookPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/playertype/PlayerTypeHookPatch.kt index aa530b0cc..e81bb3576 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/playertype/PlayerTypeHookPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/playertype/PlayerTypeHookPatch.kt @@ -7,6 +7,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.PatchException import app.revanced.patcher.patch.annotation.Patch +import app.revanced.patches.shared.litho.LithoFilterPatch +import app.revanced.patches.youtube.utils.integrations.Constants.COMPONENTS_PATH import app.revanced.patches.youtube.utils.integrations.Constants.SHARED_PATH import app.revanced.patches.youtube.utils.integrations.Constants.UTILS_PATH import app.revanced.patches.youtube.utils.playertype.fingerprint.ActionBarSearchResultsFingerprint @@ -29,7 +31,12 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.reference.FieldReference -@Patch(dependencies = [SharedResourceIdPatch::class]) +@Patch( + dependencies = [ + SharedResourceIdPatch::class, + LithoFilterPatch::class + ] +) object PlayerTypeHookPatch : BytecodePatch( setOf( ActionBarSearchResultsFingerprint, @@ -45,6 +52,9 @@ object PlayerTypeHookPatch : BytecodePatch( private const val INTEGRATIONS_ROOT_VIEW_HOOK_CLASS_DESCRIPTOR = "$SHARED_PATH/RootView;" + private const val FILTER_CLASS_DESCRIPTOR = + "$COMPONENTS_PATH/RelatedVideoFilter;" + override fun execute(context: BytecodeContext) { // region patch for set player type @@ -153,5 +163,7 @@ object PlayerTypeHookPatch : BytecodePatch( // endregion + LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) + } }