From 5c62d0a2e0217de1b9563a41b4e94ed63230440f Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 29 Jul 2022 03:26:36 +0200 Subject: [PATCH] fix: actually call `VideoInformation.setCurrentVideoId` first --- .../patches/youtube/misc/videoid/patch/VideoIdPatch.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/videoid/patch/VideoIdPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/videoid/patch/VideoIdPatch.kt index b62420fd4..247ffed31 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/videoid/patch/VideoIdPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/videoid/patch/VideoIdPatch.kt @@ -35,11 +35,13 @@ class VideoIdPatch : BytecodePatch( injectCall("Lapp/revanced/integrations/videoplayer/VideoInformation;->setCurrentVideoId(Ljava/lang/String;)V") + offset++ // offset so setCurrentVideoId is called before any injected call + return PatchResultSuccess() } companion object { - private const val offset = 3 // offset so setCurrentVideoId is called before any injected call + private var offset = 2 private var videoIdRegister: Int = 0 private lateinit var result: MethodFingerprintResult