File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed
src/main/kotlin/app/revanced/patches/letterboxd/ads Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,10 @@ public final class app/revanced/patches/irplus/ad/RemoveAdsPatchKt {
328328 public static final fun getRemoveAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
329329}
330330
331+ public final class app/revanced/patches/letterboxd/ads/HideAdsPatchKt {
332+ public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
333+ }
334+
331335public final class app/revanced/patches/lightroom/misc/login/DisableMandatoryLoginPatchKt {
332336 public static final fun getDisableMandatoryLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
333337}
Original file line number Diff line number Diff line change 1+ package app.revanced.patches.letterboxd.ads
2+
3+ import app.revanced.patcher.fingerprint
4+
5+ internal const val admobHelperClassName = " Lcom/letterboxd/letterboxd/helpers/AdmobHelper;"
6+
7+ internal val admobHelperSetShowAdsFingerprint = fingerprint {
8+ custom { method, classDef ->
9+ method.name == " setShowAds" && classDef.type == admobHelperClassName
10+ }
11+ }
12+
13+ internal val admobHelperShouldShowAdsFingerprint = fingerprint {
14+ custom { method, classDef ->
15+ method.name == " shouldShowAds" && classDef.type == admobHelperClassName
16+ }
17+ }
18+
19+ internal val filmFragmentShowAdsFingerprint = fingerprint {
20+ custom { method, classDef ->
21+ method.name == " showAds" && classDef.type.endsWith(" /FilmFragment;" )
22+ }
23+ }
24+
25+ internal val memberExtensionShowAdsFingerprint = fingerprint {
26+ custom { method, classDef ->
27+ method.name == " showAds" && classDef.type.endsWith(" /AMemberExtensionKt;" )
28+ }
29+ }
Original file line number Diff line number Diff line change 1+
2+ package app.revanced.patches.letterboxd.ads
3+
4+ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
5+ import app.revanced.patcher.patch.bytecodePatch
6+ import app.revanced.util.returnEarly
7+
8+ @Suppress(" unused" )
9+ val hideAdsPatch = bytecodePatch(
10+ name = " Hide ads" ,
11+ ) {
12+ compatibleWith(" com.letterboxd.letterboxd" )
13+
14+ execute {
15+ admobHelperSetShowAdsFingerprint.method.addInstruction(0 , " const p1, 0x0" )
16+ listOf (admobHelperShouldShowAdsFingerprint, filmFragmentShowAdsFingerprint, memberExtensionShowAdsFingerprint).forEach {
17+ it.method.returnEarly(false )
18+ }
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments