diff --git a/src/main/kotlin/app/revanced/patches/music/ads/music/MusicAdsPatch.kt b/src/main/kotlin/app/revanced/patches/music/ads/music/MusicAdsPatch.kt index f60d35db5..f0e664c59 100644 --- a/src/main/kotlin/app/revanced/patches/music/ads/music/MusicAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/ads/music/MusicAdsPatch.kt @@ -21,7 +21,7 @@ import app.revanced.util.integrations.Constants.MUSIC_COMPONENTS_PATH ) @Suppress("unused") object MusicAdsPatch : AbstractAdsPatch( - "$MUSIC_ADS_PATH/HideMusicAdsPatch;->hideMusicAds()Z" + "$MUSIC_ADS_PATH/MusicAdsPatch;->hideMusicAds()Z" ) { override fun execute(context: BytecodeContext) { super.execute(context) diff --git a/src/main/kotlin/app/revanced/patches/youtube/ads/video/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ads/video/VideoAdsPatch.kt index 956313ca0..fbffc8aed 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ads/video/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ads/video/VideoAdsPatch.kt @@ -41,7 +41,7 @@ import app.revanced.util.integrations.Constants.ADS_PATH ) @Suppress("unused") object VideoAdsPatch : AbstractAdsPatch( - "$ADS_PATH/HideVideoAdsPatch;->hideVideoAds()Z" + "$ADS_PATH/VideoAdsPatch;->hideVideoAds()Z" ) { override fun execute(context: BytecodeContext) { super.execute(context) diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/videoid/withoutshorts/VideoIdWithoutShortsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/videoid/withoutshorts/VideoIdWithoutShortsPatch.kt index 87c6250b6..ca301501e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/videoid/withoutshorts/VideoIdWithoutShortsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/videoid/withoutshorts/VideoIdWithoutShortsPatch.kt @@ -17,14 +17,13 @@ object VideoIdWithoutShortsPatch : BytecodePatch( override fun execute(context: BytecodeContext) { VideoIdWithoutShortsFingerprint.result?.let { - insertMethod = it.mutableMethod - - insertIndex = insertMethod.implementation!!.instructions.indexOfFirst { instruction -> - instruction.opcode == Opcode.INVOKE_INTERFACE + it.mutableMethod.apply { + insertMethod = this + insertIndex = implementation!!.instructions.indexOfFirst { instruction -> + instruction.opcode == Opcode.INVOKE_INTERFACE + } + insertRegister = getInstruction(insertIndex + 1).registerA } - - insertRegister = - insertMethod.getInstruction(insertIndex + 1).registerA } ?: throw VideoIdWithoutShortsFingerprint.exception injectCall("$VIDEO_PATH/VideoInformation;->setVideoId(Ljava/lang/String;)V")