Skip to content

Commit

Permalink
fix(YouTube/Player components): patch is broken in certain versions
Browse files Browse the repository at this point in the history
  • Loading branch information
inotia00 committed Sep 27, 2024
1 parent 70b45b2 commit 697dc74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.fingerprints.StartVideoInformerFingerprint
import app.revanced.patches.shared.litho.LithoFilterPatch
import app.revanced.patches.youtube.player.components.fingerprints.CrowdfundingBoxFingerprint
import app.revanced.patches.youtube.player.components.fingerprints.EngagementPanelControllerFingerprint
import app.revanced.patches.youtube.player.components.fingerprints.FilmStripOverlayConfigFingerprint
import app.revanced.patches.youtube.player.components.fingerprints.FilmStripOverlayInteractionFingerprint
import app.revanced.patches.youtube.player.components.fingerprints.FilmStripOverlayParentFingerprint
Expand All @@ -34,6 +33,7 @@ import app.revanced.patches.youtube.player.components.fingerprints.WatermarkPare
import app.revanced.patches.youtube.player.speedoverlay.SpeedOverlayPatch
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
import app.revanced.patches.youtube.utils.controlsoverlay.ControlsOverlayConfigPatch
import app.revanced.patches.youtube.utils.fingerprints.EngagementPanelBuilderFingerprint
import app.revanced.patches.youtube.utils.fingerprints.YouTubeControlsOverlayFingerprint
import app.revanced.patches.youtube.utils.fix.suggestedvideoendscreen.SuggestedVideoEndScreenPatch
import app.revanced.patches.youtube.utils.integrations.Constants.COMPONENTS_PATH
Expand Down Expand Up @@ -81,7 +81,7 @@ object PlayerComponentsPatch : BaseBytecodePatch(
compatiblePackages = COMPATIBLE_PACKAGE,
fingerprints = setOf(
CrowdfundingBoxFingerprint,
EngagementPanelControllerFingerprint,
EngagementPanelBuilderFingerprint,
FilmStripOverlayParentFingerprint,
InfoCardsIncognitoFingerprint,
LayoutCircleFingerprint,
Expand Down Expand Up @@ -158,7 +158,7 @@ object PlayerComponentsPatch : BaseBytecodePatch(
}
}

EngagementPanelControllerFingerprint.resultOrThrow().let {
EngagementPanelBuilderFingerprint.resultOrThrow().let {
it.mutableMethod.apply {
addInstructionsWithLabels(
0, """
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package app.revanced.patches.youtube.player.fullscreen.fingerprints

import app.revanced.patcher.extensions.or
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.PlayerVideoTitleView
import app.revanced.util.fingerprint.LiteralValueFingerprint
import com.android.tools.smali.dexlib2.AccessFlags

internal object PlayerTitleViewFingerprint : LiteralValueFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
returnType = "V",
literalSupplier = { PlayerVideoTitleView }
)
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package app.revanced.patches.youtube.player.components.fingerprints
package app.revanced.patches.youtube.utils.fingerprints

import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags

internal object EngagementPanelControllerFingerprint : MethodFingerprint(
internal object EngagementPanelBuilderFingerprint : MethodFingerprint(
returnType = "L",
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
parameters = listOf("L", "L", "Z", "Z"),
Expand Down

0 comments on commit 697dc74

Please sign in to comment.