rollback video-id-hook patch

This commit is contained in:
inotia00
2023-04-13 16:08:14 +09:00
parent 321ebf54b7
commit 90b7577914
15 changed files with 114 additions and 35 deletions

View File

@ -12,14 +12,14 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
import app.revanced.patches.youtube.misc.videoid.legacy.patch.LegacyVideoIdPatch
import app.revanced.patches.youtube.video.quality.bytecode.fingerprints.*
import app.revanced.util.integrations.Constants.VIDEO_PATH
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.FieldReference
@Name("default-video-quality-bytecode-patch")
@DependsOn([VideoIdPatch::class])
@DependsOn([LegacyVideoIdPatch::class])
@YouTubeCompatibility
@Version("0.0.1")
class VideoQualityBytecodePatch : BytecodePatch(
@ -62,7 +62,7 @@ class VideoQualityBytecodePatch : BytecodePatch(
)
} ?: return VideoQualitySettingsParentFingerprint.toErrorResult()
VideoIdPatch.injectCall("$INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;)V")
LegacyVideoIdPatch.injectCall("$INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;)V")
return PatchResultSuccess()
}

View File

@ -13,7 +13,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.misc.overridespeed.bytecode.fingerprints.VideoSpeedSettingsFingerprint
import app.revanced.patches.youtube.misc.overridespeed.bytecode.patch.OverrideSpeedHookPatch
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
import app.revanced.patches.youtube.misc.videoid.legacy.patch.LegacyVideoIdPatch
import app.revanced.patches.youtube.video.livestream.patch.LiveStreamPatch
import app.revanced.patches.youtube.video.speed.bytecode.fingerprints.*
import app.revanced.util.bytecode.BytecodeHelper.updatePatchStatus
@ -23,10 +23,10 @@ import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
@Name("default-video-speed-bytecode-patch")
@DependsOn(
[
LegacyVideoIdPatch::class,
LiveStreamPatch::class,
OverrideSpeedHookPatch::class,
SharedResourceIdPatch::class,
VideoIdPatch::class
SharedResourceIdPatch::class
]
)
@YouTubeCompatibility
@ -56,7 +56,7 @@ class VideoSpeedBytecodePatch : BytecodePatch(
"invoke-static {}, $INTEGRATIONS_VIDEO_SPEED_CLASS_DESCRIPTOR->setDefaultSpeed()V"
) ?: return VideoSpeedSettingsFingerprint.toErrorResult()
VideoIdPatch.injectCall("$INTEGRATIONS_VIDEO_SPEED_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;)V")
LegacyVideoIdPatch.injectCall("$INTEGRATIONS_VIDEO_SPEED_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;)V")
context.updatePatchStatus("VideoSpeed")