mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
feat(youtube/hide-get-premium): removed from patch list and dependent on hide-general-ads
patch
This commit is contained in:
@ -13,6 +13,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.ads.general.bytecode.patch.GeneralAdsBytecodePatch
|
||||
import app.revanced.patches.youtube.ads.getpremium.patch.HideGetPremiumPatch
|
||||
import app.revanced.patches.youtube.misc.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import org.w3c.dom.Element
|
||||
@ -22,6 +23,7 @@ import org.w3c.dom.Element
|
||||
@Description("Removes general ads.")
|
||||
@DependsOn(
|
||||
[
|
||||
HideGetPremiumPatch::class,
|
||||
GeneralAdsBytecodePatch::class,
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.general.getpremium.fingerprints
|
||||
package app.revanced.patches.youtube.ads.getpremium.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
@ -1,7 +1,6 @@
|
||||
package app.revanced.patches.youtube.layout.general.getpremium.patch
|
||||
package app.revanced.patches.youtube.ads.getpremium.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@ -10,20 +9,12 @@ import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.layout.general.getpremium.fingerprints.CompactYpcOfferModuleViewFingerprint
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.GENERAL
|
||||
import app.revanced.patches.youtube.ads.getpremium.fingerprints.CompactYpcOfferModuleViewFingerprint
|
||||
import app.revanced.util.integrations.Constants.PATCHES_PATH
|
||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("hide-get-premium")
|
||||
@Description("Hides the YouTube Premium promotion banner between the player and video description.")
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@YouTubeCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideGetPremiumPatch : BytecodePatch(
|
||||
listOf(
|
||||
@ -42,7 +33,7 @@ class HideGetPremiumPatch : BytecodePatch(
|
||||
|
||||
addInstructions(
|
||||
startIndex + 2, """
|
||||
invoke-static {}, $GENERAL->hideGetPremium()Z
|
||||
invoke-static {}, $PATCHES_PATH/ads/GeneralAdsPatch;->hideGetPremium()Z
|
||||
move-result v$tempRegister
|
||||
if-eqz v$tempRegister, :show
|
||||
const/4 v$measuredWidthRegister, 0x0
|
||||
@ -52,18 +43,6 @@ class HideGetPremiumPatch : BytecodePatch(
|
||||
}
|
||||
} ?: return CompactYpcOfferModuleViewFingerprint.toErrorResult()
|
||||
|
||||
/*
|
||||
* Add settings
|
||||
*/
|
||||
SettingsPatch.addPreference(
|
||||
arrayOf(
|
||||
"PREFERENCE: GENERAL_SETTINGS",
|
||||
"SETTINGS: HIDE_GET_PREMIUM"
|
||||
)
|
||||
)
|
||||
|
||||
SettingsPatch.updatePatchStatus("hide-get-premium")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user