mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 13:17:46 +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()
|
||||
}
|
||||
}
|
@ -14,6 +14,9 @@
|
||||
<string name="revanced_ad_remover_general_ads_summary_off">General ads are shown</string>
|
||||
<string name="revanced_ad_remover_general_ads_summary_on">General ads are hidden</string>
|
||||
<string name="revanced_ad_remover_general_ads_title">Hide general ads</string>
|
||||
<string name="revanced_ad_remover_get_premium_summary_off">YouTube Premium promotion are shown</string>
|
||||
<string name="revanced_ad_remover_get_premium_summary_on">YouTube Premium promotion are hidden</string>
|
||||
<string name="revanced_ad_remover_get_premium_title">Hide YouTube Premium promotion</string>
|
||||
<string name="revanced_ad_remover_paid_content_summary_off">Paid promotion label is shown</string>
|
||||
<string name="revanced_ad_remover_paid_content_summary_on">Paid promotion label is hidden</string>
|
||||
<string name="revanced_ad_remover_paid_content_title">Hide paid promotion</string>
|
||||
@ -292,9 +295,6 @@ Please do not report any issues you encounter while using this feature."</string
|
||||
<string name="revanced_hide_fullscreen_panels_summary_off">Fullscreen panels are shown</string>
|
||||
<string name="revanced_hide_fullscreen_panels_summary_on">Fullscreen panels are hidden</string>
|
||||
<string name="revanced_hide_fullscreen_panels_title">Hide fullscreen panels</string>
|
||||
<string name="revanced_hide_get_premium_summary_off">YouTube Premium promotion are shown</string>
|
||||
<string name="revanced_hide_get_premium_summary_on">YouTube Premium promotion are hidden</string>
|
||||
<string name="revanced_hide_get_premium_title">Hide YouTube Premium promotion</string>
|
||||
<string name="revanced_hide_home_button_summary_off">Home button is shown</string>
|
||||
<string name="revanced_hide_home_button_summary_on">Home button is hidden</string>
|
||||
<string name="revanced_hide_home_button_title">Hide home button</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<SwitchPreference android:title="@string/revanced_ad_remover_button_ads_title" android:key="revanced_ad_remover_button_ads" android:defaultValue="true" android:summaryOn="@string/revanced_ad_remover_button_ads_summary_on" android:summaryOff="@string/revanced_ad_remover_button_ads_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_ad_remover_paid_content_title" android:key="revanced_ad_remover_paid_content" android:defaultValue="true" android:summaryOn="@string/revanced_ad_remover_paid_content_summary_on" android:summaryOff="@string/revanced_ad_remover_paid_content_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_ad_remover_self_sponsor_title" android:key="revanced_ad_remover_self_sponsor" android:defaultValue="true" android:summaryOn="@string/revanced_ad_remover_self_sponsor_summary_on" android:summaryOff="@string/revanced_ad_remover_self_sponsor_summary_off" />
|
||||
<SwitchPreference android:title="@string/revanced_ad_remover_get_premium_title" android:key="revanced_ad_remover_get_premium" android:defaultValue="true" android:summaryOn="@string/revanced_ad_remover_get_premium_summary_on" android:summaryOff="@string/revanced_ad_remover_get_premium_summary_off" />
|
||||
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_ad_remover_custom_filter_title" />
|
||||
<SwitchPreference android:title="@string/revanced_ad_remover_user_filter_title" android:key="revanced_ad_remover_user_filter" android:defaultValue="false" android:summaryOn="@string/revanced_ad_remover_user_filter_summary_on" android:summaryOff="@string/revanced_ad_remover_user_filter_summary_off" />
|
||||
<EditTextPreference android:title="@string/revanced_ad_remover_custom_filter_title" android:key="revanced_ad_remover_custom_strings" android:summary="@string/revanced_ad_remover_custom_filter_summary" android:defaultValue=" " android:inputType="text" android:dependency="revanced_ad_remover_user_filter" />SETTINGS: HIDE_GENERAL_ADS -->
|
||||
@ -95,9 +96,6 @@
|
||||
<!-- SETTINGS: HIDE_CROWDFUNDING_BOX
|
||||
<SwitchPreference android:title="@string/revanced_hide_crowdfunding_box_title" android:key="revanced_hide_crowdfunding_box" android:defaultValue="true" android:summaryOn="@string/revanced_hide_crowdfunding_box_summary_on" android:summaryOff="@string/revanced_hide_crowdfunding_box_summary_off" />SETTINGS: HIDE_CROWDFUNDING_BOX -->
|
||||
|
||||
<!-- SETTINGS: HIDE_GET_PREMIUM
|
||||
<SwitchPreference android:title="@string/revanced_hide_get_premium_title" android:key="revanced_hide_get_premium" android:defaultValue="true" android:summaryOn="@string/revanced_hide_get_premium_summary_on" android:summaryOff="@string/revanced_hide_get_premium_summary_off" />SETTINGS: HIDE_GET_PREMIUM -->
|
||||
|
||||
<!-- SETTINGS: HIDE_EMAIL_ADDRESS
|
||||
<SwitchPreference android:title="@string/revanced_hide_email_address_title" android:key="revanced_hide_email_address" android:defaultValue="true" android:summaryOn="@string/revanced_hide_email_address_summary_on" android:summaryOff="@string/revanced_hide_email_address_summary_off" />SETTINGS: HIDE_EMAIL_ADDRESS -->
|
||||
|
||||
@ -475,7 +473,6 @@
|
||||
<Preference android:title="hide-auto-player-popup-panels" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-mix-playlists" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-crowdfunding-box" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-get-premium" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-email-address" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-snack-bar" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
<Preference android:title="hide-search-terms" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||
|
Reference in New Issue
Block a user