Skip to content

Commit

Permalink
fix(youtube/video-information): use correct compatibility annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Nov 5, 2022
1 parent d8b849f commit 506b134
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ import app.revanced.patcher.annotation.Package
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class PlayerControllerCompatibility
internal annotation class VideoInformationCompatibility
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import app.revanced.patcher.annotation.Version

import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
import app.revanced.patches.youtube.misc.video.information.annotation.VideoInformationCompatibility

@Name("create-video-player-seekbar-fingerprint")
@SponsorBlockCompatibility
@VideoInformationCompatibility
@Version("0.0.1")
object CreateVideoPlayerSeekbarFingerprint : MethodFingerprint(
"V",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import app.revanced.patcher.annotation.Version

import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
import app.revanced.patches.youtube.misc.video.information.annotation.VideoInformationCompatibility
import org.jf.dexlib2.Opcode

@Name("player-controller-set-time-reference-fingerprint")

@SponsorBlockCompatibility
@VideoInformationCompatibility
@Version("0.0.1")
object PlayerControllerSetTimeReferenceFingerprint : MethodFingerprint(
opcodes = listOf(Opcode.INVOKE_DIRECT_RANGE, Opcode.IGET_OBJECT),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import app.revanced.patcher.annotation.Version

import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
import app.revanced.patches.youtube.misc.video.information.annotation.VideoInformationCompatibility

@Name("player-init-fingerprint")

@SponsorBlockCompatibility
@VideoInformationCompatibility
@Version("0.0.1")
object PlayerInitFingerprint : MethodFingerprint(
strings = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import app.revanced.patcher.annotation.Version

import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
import app.revanced.patches.youtube.misc.video.information.annotation.VideoInformationCompatibility

@Name("seek-fingerprint")

@SponsorBlockCompatibility
@VideoInformationCompatibility
@Version("0.0.1")
object SeekFingerprint : MethodFingerprint(
strings = listOf("Attempting to seek during an ad")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import app.revanced.patcher.annotation.Version

import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
import app.revanced.patches.youtube.misc.video.information.annotation.VideoInformationCompatibility
import org.jf.dexlib2.Opcode

@Name("video-length-fingerprint")

@SponsorBlockCompatibility
@VideoInformationCompatibility
@Version("0.0.1")
object VideoLengthFingerprint : MethodFingerprint(
opcodes = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import app.revanced.patcher.annotation.Version

import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
import app.revanced.patches.youtube.misc.video.information.annotation.VideoInformationCompatibility

@Name("video-time-fingerprint")
@SponsorBlockCompatibility
@VideoInformationCompatibility
@Version("0.0.1")
object VideoTimeFingerprint : MethodFingerprint(
strings = listOf("MedialibPlayerTimeInfo{currentPositionMillis=")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.video.speed.remember.annotation.RememberPlaybackSpeedCompatibility
import app.revanced.patches.youtube.misc.video.information.annotation.VideoInformationCompatibility
import app.revanced.patches.youtube.misc.video.information.fingerprints.*
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.builder.MutableMethodImplementation
Expand All @@ -29,7 +29,7 @@ import org.jf.dexlib2.util.MethodUtil

@Name("video-information")
@Description("Hooks YouTube to get information about the current playing video.")
@RememberPlaybackSpeedCompatibility
@VideoInformationCompatibility
@Version("0.0.1")
@DependsOn([IntegrationsPatch::class])
class VideoInformationPatch : BytecodePatch(
Expand Down

0 comments on commit 506b134

Please sign in to comment.