From 02d415103aa045dccb88108b22bdbda29e0066ae Mon Sep 17 00:00:00 2001 From: inotia00 Date: Sat, 1 Apr 2023 17:48:43 +0900 Subject: [PATCH] fix(youtube/sponsorblock): fix segments not skipping during background play --- .../sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt index 269a7d7c6..3151efd70 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt @@ -17,6 +17,7 @@ import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.sponsorblock.bytecode.fingerprints.* import app.revanced.patches.youtube.misc.timebar.patch.HookTimebarPatch +import app.revanced.patches.youtube.misc.videoid.legacy.patch.LegacyVideoIdPatch import app.revanced.patches.youtube.misc.videoid.mainstream.patch.MainstreamVideoIdPatch import app.revanced.util.bytecode.BytecodeHelper.injectInit import app.revanced.util.bytecode.BytecodeHelper.updatePatchStatus @@ -31,6 +32,7 @@ import org.jf.dexlib2.iface.reference.MethodReference @Name("sponsorblock-bytecode-patch") @DependsOn( [ + LegacyVideoIdPatch::class, MainstreamVideoIdPatch::class, PlayerControlsPatch::class, PlayerTypeHookPatch::class, @@ -62,8 +64,9 @@ class SponsorBlockBytecodePatch : BytecodePatch( } /* - * Inject MainstreamVideoIdPatch + * Inject VideoIdPatch */ + LegacyVideoIdPatch.injectCall("$INTEGRATIONS_PLAYER_CONTROLLER_CLASS_DESCRIPTOR->setCurrentVideoId(Ljava/lang/String;)V") MainstreamVideoIdPatch.injectCall("$INTEGRATIONS_PLAYER_CONTROLLER_CLASS_DESCRIPTOR->setCurrentVideoId(Ljava/lang/String;)V")