diff --git a/src/main/kotlin/app/revanced/patches/youtube/player/suggestedvideooverlay/SuggestedVideoOverlayPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/player/suggestedvideooverlay/SuggestedVideoOverlayPatch.kt index 399d71e65..2c4ec2d7b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/player/suggestedvideooverlay/SuggestedVideoOverlayPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/player/suggestedvideooverlay/SuggestedVideoOverlayPatch.kt @@ -12,7 +12,6 @@ import app.revanced.patches.youtube.player.suggestedvideooverlay.fingerprints.Co import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.CoreContainer import app.revanced.patches.youtube.utils.settings.SettingsPatch -import app.revanced.patches.youtube.utils.videoid.general.VideoIdPatch import app.revanced.util.bytecode.getWideLiteralIndex import app.revanced.util.integrations.Constants.PLAYER import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction @@ -23,8 +22,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction description = "Hide the suggested video overlay to play next.", dependencies = [ SettingsPatch::class, - SharedResourceIdPatch::class, - VideoIdPatch::class + SharedResourceIdPatch::class ], compatiblePackages = [ CompatiblePackage( @@ -73,13 +71,6 @@ object SuggestedVideoOverlayPatch : BytecodePatch( } } ?: throw CoreConatinerBuilderFingerprint.exception - VideoIdPatch.videoEndMethod.apply { - addInstruction( - implementation!!.instructions.size - 1, - "invoke-static {},$PLAYER->hideSuggestedVideoOverlay()V" - ) - } - /** * Add settings */ @@ -94,7 +85,4 @@ object SuggestedVideoOverlayPatch : BytecodePatch( SettingsPatch.updatePatchStatus("Hide suggested video overlay") } - - private const val INTEGRATIONS_CLASS_DESCRIPTOR = - "$PLAYER->hideSuggestedVideoOverlay(Landroid/view/ViewGroup;)V" } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/videoid/general/VideoIdPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/videoid/general/VideoIdPatch.kt index 69728cc17..5fed3b9bf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/videoid/general/VideoIdPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/videoid/general/VideoIdPatch.kt @@ -67,7 +67,7 @@ object VideoIdPatch : BytecodePatch( ) it.mutableClass.methods.add(seekHelperMethod) - videoEndMethod = context.toMethodWalker(it.method) + val videoEndMethod = context.toMethodWalker(it.method) .nextMethod(it.scanResult.patternScanResult!!.startIndex + 1, true) .getMethod() as MutableMethod @@ -145,7 +145,6 @@ object VideoIdPatch : BytecodePatch( private lateinit var insertMethod: MutableMethod private lateinit var playerInitMethod: MutableMethod private lateinit var timeMethod: MutableMethod - internal lateinit var videoEndMethod: MutableMethod /** * Adds an invoke-static instruction, called with the new id when the video changes