From 5655067f28d010f3a7a6d91b09ac984eee162031 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 2 Oct 2023 15:34:14 +0200 Subject: [PATCH] fix: Add hooks to existing hook set Previously, the hooks were just combined to a new set and returned, without adding them to original mutable set. --- .../patches/youtube/misc/fix/playback/SpoofSignaturePatch.kt | 2 +- .../app/revanced/patches/youtube/video/videoid/VideoIdPatch.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignaturePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignaturePatch.kt index 2f594c7aa3..1d1b8bb203 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignaturePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignaturePatch.kt @@ -88,7 +88,7 @@ object SpoofSignaturePatch : BytecodePatch( ) // Hook the player parameters. - PlayerResponseMethodHookPatch + PlayerResponseMethodHookPatch.Hook.ProtoBufferParameter( + PlayerResponseMethodHookPatch += PlayerResponseMethodHookPatch.Hook.ProtoBufferParameter( "$INTEGRATIONS_CLASS_DESCRIPTOR->spoofParameter(Ljava/lang/String;)Ljava/lang/String;" ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoid/VideoIdPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/VideoIdPatch.kt index 57df0c97f1..f720407478 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoid/VideoIdPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/VideoIdPatch.kt @@ -120,7 +120,7 @@ object VideoIdPatch : BytecodePatch( * @param methodDescriptor which method to call. Params have to be `Ljava/lang/String;` */ fun hookPlayerResponseVideoId(methodDescriptor: String) { - PlayerResponseMethodHookPatch + PlayerResponseMethodHookPatch.Hook.VideoId( + PlayerResponseMethodHookPatch += PlayerResponseMethodHookPatch.Hook.VideoId( methodDescriptor ) }