Skip to content

Commit

Permalink
fix(youtube/video-ads): return empty ad list earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 17, 2022
1 parent bfd80dd commit e346f7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import org.jf.dexlib2.Opcode
@Version("0.0.1")
object LoadAdsFingerprint : MethodFingerprint(
opcodes = listOf(Opcode.INVOKE_INTERFACE_RANGE),
customFingerprint = { method ->
method.parameterTypes.size > 0 && method.parameterTypes.first().endsWith("InstreamAdBreak;")
}
strings = listOf(
"Received unsupported ad type, this should never happen.",
"AdBreakRenderer path ad playerResponse cannot be deserialized."
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class VideoAdsPatch : BytecodePatch(
invoke-static { }, Lapp/revanced/integrations/patches/VideoAdsPatch;->shouldShowAds()Z
move-result v4
if-nez v4, :show_video_ads
return-object v3
return-object v9
""",
listOf(ExternalLabel("show_video_ads", instruction(insertIndex)))
)
Expand Down

0 comments on commit e346f7f

Please sign in to comment.