feat: apply code review suggestions

This commit is contained in:
inotia00 2024-08-06 11:50:56 +09:00
parent d647061d94
commit ec85abc1c7
14 changed files with 265 additions and 255 deletions

View File

@ -0,0 +1,136 @@
package app.revanced.patches.youtube.general.downloads
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.youtube.general.downloads.fingerprints.AccessibilityOfflineButtonSyncFingerprint
import app.revanced.patches.youtube.general.downloads.fingerprints.DownloadPlaylistButtonOnClickFingerprint
import app.revanced.patches.youtube.general.downloads.fingerprints.DownloadPlaylistButtonOnClickFingerprint.indexOfPlaylistDownloadActionInvokeInstruction
import app.revanced.patches.youtube.general.downloads.fingerprints.OfflineVideoEndpointFingerprint
import app.revanced.patches.youtube.general.downloads.fingerprints.SetPlaylistDownloadButtonVisibilityFingerprint
import app.revanced.patches.youtube.utils.compatibility.Constants
import app.revanced.patches.youtube.utils.integrations.Constants.GENERAL_PATH
import app.revanced.patches.youtube.utils.pip.PiPStateHookPatch
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
import app.revanced.patches.youtube.utils.settings.SettingsPatch
import app.revanced.util.alsoResolve
import app.revanced.util.getReference
import app.revanced.util.indexOfFirstInstructionOrThrow
import app.revanced.util.patch.BaseBytecodePatch
import app.revanced.util.resultOrThrow
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
@Suppress("unused")
object DownloadActionsPatch : BaseBytecodePatch(
name = "Hook download actions",
description = "Adds support to download videos with an external downloader app using the in-app download button.",
dependencies = setOf(
PiPStateHookPatch::class,
SharedResourceIdPatch::class,
SettingsPatch::class
),
compatiblePackages = Constants.COMPATIBLE_PACKAGE,
fingerprints = setOf(
AccessibilityOfflineButtonSyncFingerprint,
DownloadPlaylistButtonOnClickFingerprint,
OfflineVideoEndpointFingerprint,
)
) {
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
"$GENERAL_PATH/DownloadActionsPatch;"
override fun execute(context: BytecodeContext) {
// region patch for hook download actions (video action bar and flyout panel)
OfflineVideoEndpointFingerprint.resultOrThrow().mutableMethod.apply {
addInstructionsWithLabels(
0, """
invoke-static/range {p3 .. p3}, $INTEGRATIONS_CLASS_DESCRIPTOR->inAppVideoDownloadButtonOnClick(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :show_native_downloader
return-void
""", ExternalLabel("show_native_downloader", getInstruction(0))
)
}
// endregion
// region patch for hook download actions (playlist)
val onClickListenerClass =
DownloadPlaylistButtonOnClickFingerprint.resultOrThrow().mutableMethod.let {
val playlistDownloadActionInvokeIndex =
indexOfPlaylistDownloadActionInvokeInstruction(it)
it.getInstructions().subList(
playlistDownloadActionInvokeIndex - 10,
playlistDownloadActionInvokeIndex,
).find { instruction ->
instruction.opcode == Opcode.INVOKE_VIRTUAL_RANGE
&& instruction.getReference<MethodReference>()?.parameterTypes?.first() == "Ljava/lang/String;"
}?.getReference<MethodReference>()?.returnType
?: throw PatchException("Could not find onClickListenerClass")
}
context.findClass(onClickListenerClass)
?.mutableClass
?.methods
?.first { method -> method.name == "onClick" }?.apply {
val insertIndex = indexOfFirstInstructionOrThrow {
opcode == Opcode.INVOKE_STATIC
&& getReference<MethodReference>()?.name == "isEmpty"
}
val insertRegister = getInstruction<FiveRegisterInstruction>(insertIndex).registerC
addInstructions(
insertIndex, """
invoke-static {v$insertRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->inAppPlaylistDownloadButtonOnClick(Ljava/lang/String;)Ljava/lang/String;
move-result-object v$insertRegister
"""
)
} ?: throw PatchException("Could not find class $onClickListenerClass")
// endregion
// region patch for show the playlist download button
SetPlaylistDownloadButtonVisibilityFingerprint
.alsoResolve(context, AccessibilityOfflineButtonSyncFingerprint).let {
it.mutableMethod.apply {
val insertIndex = it.scanResult.patternScanResult!!.startIndex + 2
val insertRegister =
getInstruction<OneRegisterInstruction>(insertIndex).registerA
addInstructions(
insertIndex, """
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->overridePlaylistDownloadButtonVisibility()Z
move-result v$insertRegister
"""
)
}
}
// endregion
/**
* Add settings
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE_SCREEN: GENERAL",
"PREFERENCE_CATEGORY: GENERAL_EXPERIMENTAL_FLAGS",
"SETTINGS: HOOK_DOWNLOAD_ACTIONS"
)
)
SettingsPatch.updatePatchStatus(this)
}
}

View File

@ -1,12 +1,12 @@
package app.revanced.patches.youtube.misc.downloadactions.fingerprints
package app.revanced.patches.youtube.general.downloads.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.AccessibilityOfflineButtonSync
import app.revanced.util.fingerprint.LiteralValueFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
object AccessibilityOfflineButtonSyncFingerprint : LiteralValueFingerprint(
internal object AccessibilityOfflineButtonSyncFingerprint : LiteralValueFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
returnType = "V",
literalSupplier = { AccessibilityOfflineButtonSync }
)
)

View File

@ -0,0 +1,32 @@
package app.revanced.patches.youtube.general.downloads.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import app.revanced.patches.youtube.general.downloads.fingerprints.DownloadPlaylistButtonOnClickFingerprint.indexOfPlaylistDownloadActionInvokeInstruction
import app.revanced.util.getReference
import app.revanced.util.indexOfFirstInstruction
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.Method
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
internal object DownloadPlaylistButtonOnClickFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
returnType = "V",
opcodes = listOf(Opcode.INVOKE_VIRTUAL_RANGE),
customFingerprint = { methodDef, _ ->
indexOfPlaylistDownloadActionInvokeInstruction(methodDef) >= 0
}
) {
fun indexOfPlaylistDownloadActionInvokeInstruction(methodDef: Method) =
methodDef.indexOfFirstInstruction {
opcode == Opcode.INVOKE_VIRTUAL &&
getReference<MethodReference>()?.parameterTypes ==
listOf(
"Ljava/lang/String;",
"Lcom/google/android/apps/youtube/app/offline/ui/OfflineArrowView;",
"I",
"Landroid/view/View${'$'}OnClickListener;"
)
}
}

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.misc.downloadactions.fingerprints
package app.revanced.patches.youtube.general.downloads.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint

View File

@ -1,9 +1,12 @@
package app.revanced.patches.youtube.misc.downloadactions.fingerprints
package app.revanced.patches.youtube.general.downloads.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode
object SetPlaylistDownloadButtonVisibilityFingerprint : MethodFingerprint(
/**
* Resolves using class found in [AccessibilityOfflineButtonSyncFingerprint].
*/
internal object SetPlaylistDownloadButtonVisibilityFingerprint : MethodFingerprint(
returnType = "V",
opcodes = listOf(
Opcode.INVOKE_VIRTUAL,

View File

@ -1,174 +0,0 @@
package app.revanced.patches.youtube.misc.downloadactions
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.youtube.misc.downloadactions.fingerprints.*
import app.revanced.patches.youtube.utils.compatibility.Constants
import app.revanced.patches.youtube.utils.integrations.Constants.INTEGRATIONS_PATH
import app.revanced.patches.youtube.utils.integrations.Constants.MISC_PATH
import app.revanced.patches.youtube.utils.mainactivity.MainActivityResolvePatch
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
import app.revanced.patches.youtube.utils.settings.SettingsPatch
import app.revanced.util.getReference
import app.revanced.util.indexOfFirstInstructionOrThrow
import app.revanced.util.patch.BaseBytecodePatch
import app.revanced.util.resultOrThrow
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
@Suppress("unused")
object HookDownloadActionsPatch : BaseBytecodePatch(
name = "Hook download actions",
description = "Adds options to show the download playlist button and hook the download actions.",
dependencies = setOf(
MainActivityResolvePatch::class,
SharedResourceIdPatch::class,
SettingsPatch::class
),
compatiblePackages = Constants.COMPATIBLE_PACKAGE,
fingerprints = setOf(
OfflineVideoEndpointFingerprint,
PiPPlaybackFingerprint,
AccessibilityOfflineButtonSyncFingerprint,
DownloadPlaylistButtonOnClickFingerprint
)
) {
private const val INTEGRATIONS_DOWNLOAD_PLAYLIST_BUTTON_CLASS_DESCRIPTOR =
"$MISC_PATH/HookDownloadAction;"
private const val INTEGRATIONS_VIDEO_UTILS_CLASS_DESCRIPTOR =
"$INTEGRATIONS_PATH/utils/VideoUtils;"
override fun execute(context: BytecodeContext) {
// region Patch for hook download actions
OfflineVideoEndpointFingerprint.resultOrThrow().mutableMethod.apply {
addInstructionsWithLabels(
0, """
invoke-static/range {p3 .. p3}, $INTEGRATIONS_VIDEO_UTILS_CLASS_DESCRIPTOR->inAppDownloadButtonOnClick(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :show_native_downloader
return-void
""", ExternalLabel("show_native_downloader", getInstruction(0))
)
}
PiPPlaybackFingerprint.resultOrThrow().let {
it.mutableMethod.apply {
val insertIndex = it.scanResult.patternScanResult!!.endIndex
val insertRegister = getInstruction<OneRegisterInstruction>(insertIndex).registerA
addInstructions(
insertIndex, """
invoke-static {v$insertRegister}, $INTEGRATIONS_VIDEO_UTILS_CLASS_DESCRIPTOR->getExternalDownloaderLaunchedState(Z)Z
move-result v$insertRegister
"""
)
}
}
// endregion
// region Force show the playlist download button
AccessibilityOfflineButtonSyncFingerprint.resultOrThrow().let { parentResult ->
SetPlaylistDownloadButtonVisibilityFingerprint.also {
it.resolve(
context,
parentResult.classDef
)
}.resultOrThrow().let { setVisibilityMethod ->
setVisibilityMethod.mutableMethod.apply {
// Find the index of if-nez
val insertIndex = setVisibilityMethod.scanResult.patternScanResult!!.startIndex + 2
// Get register values used in if-nez
val insertRegister = getInstruction<OneRegisterInstruction>(insertIndex).registerA
// Add instructions just above the index of if-nez
addInstructions(
insertIndex,
"""
invoke-static {}, $INTEGRATIONS_DOWNLOAD_PLAYLIST_BUTTON_CLASS_DESCRIPTOR->isPlaylistDownloadButtonHooked()Z
move-result v$insertRegister
"""
)
}
}
}
// endregion
// region Hook Download Playlist Button OnClick method
DownloadPlaylistButtonOnClickFingerprint.resultOrThrow().let {
it.mutableMethod.apply {
// region Get the index of the instruction that initializes the onClickListener
val onClickListenerInitializeIndex = indexOfFirstInstructionOrThrow {
val reference = ((this as? ReferenceInstruction)?.reference as? MethodReference)
opcode == Opcode.INVOKE_VIRTUAL_RANGE
&& reference?.parameterTypes?.first() == "Ljava/lang/String;"
}
// endregion
// region Get the class that contains the onClick method
val onClickListenerInitializeReference =
getInstruction<ReferenceInstruction>(onClickListenerInitializeIndex).reference
val onClickClass = context.findClass(
(onClickListenerInitializeReference as MethodReference).returnType
)!!.mutableClass
// endregion
onClickClass.methods.find { method -> method.name == "onClick" }?.apply {
// region Get the index of playlist id
val insertIndex = implementation!!.instructions.indexOfFirst { instruction ->
instruction.opcode == Opcode.INVOKE_STATIC
&& instruction.getReference<MethodReference>()?.name == "isEmpty"
}
val insertRegister = getInstruction<Instruction35c>(insertIndex).registerC
// endregion
addInstructions(
insertIndex,
"""
invoke-static {v$insertRegister}, $INTEGRATIONS_DOWNLOAD_PLAYLIST_BUTTON_CLASS_DESCRIPTOR->startPlaylistDownloadActivity(Ljava/lang/String;)Ljava/lang/String;
move-result-object v$insertRegister
""".trimIndent()
)
}
}
}
// endregion
/**
* Add settings
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE_SCREEN: GENERAL",
"SETTINGS: HOOK_DOWNLOAD_ACTIONS"
)
)
SettingsPatch.updatePatchStatus(this)
}
}

View File

@ -1,29 +0,0 @@
package app.revanced.patches.youtube.misc.downloadactions.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import app.revanced.patches.youtube.misc.downloadactions.fingerprints.DownloadPlaylistButtonOnClickFingerprint.PLAYLIST_ON_CLICK_INITIALIZE_PAREMETER
import app.revanced.util.getReference
import app.revanced.util.indexOfFirstInstruction
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
object DownloadPlaylistButtonOnClickFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
returnType = "V",
customFingerprint = { methodDef, _ ->
methodDef.indexOfFirstInstruction {
opcode == Opcode.INVOKE_VIRTUAL &&
getReference<MethodReference>()?.parameterTypes == PLAYLIST_ON_CLICK_INITIALIZE_PAREMETER
} >= 0
}
) {
val PLAYLIST_ON_CLICK_INITIALIZE_PAREMETER = listOf(
"Ljava/lang/String;",
"Lcom/google/android/apps/youtube/app/offline/ui/OfflineArrowView;",
"I",
"Landroid/view/View${'$'}OnClickListener;"
)
}

View File

@ -5,31 +5,24 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWith
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.youtube.player.overlaybuttons.fingerprints.PlayerButtonConstructorFingerprint
import app.revanced.patches.youtube.utils.integrations.Constants.UTILS_PATH
import app.revanced.patches.youtube.utils.mainactivity.MainActivityResolvePatch
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
import app.revanced.patches.youtube.video.information.VideoInformationPatch
import app.revanced.util.*
import app.revanced.util.addFieldAndInstructions
import app.revanced.util.getReference
import app.revanced.util.getTargetIndexWithReferenceOrThrow
import app.revanced.util.indexOfFirstInstruction
import app.revanced.util.indexOfFirstInstructionOrThrow
import app.revanced.util.resultOrThrow
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
@Patch(
dependencies = [
MainActivityResolvePatch::class,
SharedResourceIdPatch::class,
VideoInformationPatch::class
]
)
object OverlayButtonsBytecodePatch : BytecodePatch(
setOf(
PlayerButtonConstructorFingerprint
)
setOf(PlayerButtonConstructorFingerprint)
) {
private const val INTEGRATIONS_ALWAYS_REPEAT_CLASS_DESCRIPTOR =
"$UTILS_PATH/AlwaysRepeatPatch;"

View File

@ -6,6 +6,7 @@ import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatc
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
import app.revanced.patches.youtube.utils.fix.bottomui.CfBottomUIPatch
import app.revanced.patches.youtube.utils.integrations.Constants.OVERLAY_BUTTONS_PATH
import app.revanced.patches.youtube.utils.pip.PiPStateHookPatch
import app.revanced.patches.youtube.utils.playercontrols.PlayerControlsPatch
import app.revanced.patches.youtube.utils.settings.SettingsPatch
import app.revanced.patches.youtube.video.information.VideoInformationPatch
@ -29,6 +30,7 @@ object OverlayButtonsPatch : BaseResourcePatch(
description = "Adds options to display overlay buttons in the video player.",
dependencies = setOf(
CfBottomUIPatch::class,
PiPStateHookPatch::class,
PlayerControlsPatch::class,
SettingsPatch::class,
OverlayButtonsBytecodePatch::class,

View File

@ -0,0 +1,40 @@
package app.revanced.patches.youtube.utils.pip
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.youtube.utils.integrations.Constants.INTEGRATIONS_PATH
import app.revanced.patches.youtube.utils.mainactivity.MainActivityResolvePatch
import app.revanced.patches.youtube.utils.pip.fingerprints.PiPPlaybackFingerprint
import app.revanced.util.resultOrThrow
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Patch(
description = "Hooks YouTube to prevent it from switching to PiP when an external downloader is launched.",
dependencies = [MainActivityResolvePatch::class]
)
object PiPStateHookPatch : BytecodePatch(
setOf(PiPPlaybackFingerprint)
) {
private const val INTEGRATIONS_VIDEO_UTILS_CLASS_DESCRIPTOR =
"$INTEGRATIONS_PATH/utils/VideoUtils;"
override fun execute(context: BytecodeContext) {
PiPPlaybackFingerprint.resultOrThrow().let {
it.mutableMethod.apply {
val insertIndex = it.scanResult.patternScanResult!!.endIndex
val insertRegister = getInstruction<OneRegisterInstruction>(insertIndex).registerA
addInstructions(
insertIndex, """
invoke-static {v$insertRegister}, $INTEGRATIONS_VIDEO_UTILS_CLASS_DESCRIPTOR->getExternalDownloaderLaunchedState(Z)Z
move-result v$insertRegister
"""
)
}
}
}
}

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.misc.downloadactions.fingerprints
package app.revanced.patches.youtube.utils.pip.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode

View File

@ -94,22 +94,28 @@
<item>1440</item>
<item>2160</item>
</string-array>
<string-array name="revanced_external_downloader_label">
<string-array name="revanced_external_downloader_video_label">
<item>NewPipe</item>
<item>Seal</item>
<item>Tubular</item>
<item>YTDLnis</item>
</string-array>
<string-array name="revanced_external_downloader_package_name">
<string-array name="revanced_external_downloader_video_package_name">
<item>org.schabi.newpipe</item>
<item>com.junkfood.seal</item>
<item>org.polymorphicshade.tubular</item>
<item>com.deniscerri.ytdl</item>
</string-array>
<string-array name="revanced_external_downloader_website">
<item>https://github.com/TeamNewPipe/NewPipe/releases/latest</item>
<item>https://github.com/JunkFood02/Seal/releases/latest</item>
<item>https://github.com/polymorphicshade/Tubular/releases/latest</item>
<string-array name="revanced_external_downloader_video_website">
<item>https://github.com/deniscerri/ytdlnis/releases/latest</item>
</string-array>
<string-array name="revanced_external_downloader_playlist_label">
<item>YTDLnis</item>
</string-array>
<string-array name="revanced_external_downloader_playlist_package_name">
<item>com.deniscerri.ytdl</item>
</string-array>
<string-array name="revanced_external_downloader_playlist_website">
<item>https://github.com/deniscerri/ytdlnis/releases/latest</item>
</string-array>
<string-array name="revanced_miniplayer_type_19_15_entries">

View File

@ -4,17 +4,24 @@
<string name="accessibility_settings_edu_opt_in_text">Enable accessibility controls for the video player?</string>
<string name="accessibility_settings_edu_opt_out_text">Your controls are modified because an accessibility service is on.</string>
<!-- Shared PreferenceScreen -->
<!-- Shared -->
<string name="revanced_extended_settings_title">ReVanced Extended</string>
<string name="revanced_extended_settings_search_title">Search %s</string>
<!-- Shared Category -->
<string name="revanced_preference_category_experimental_flag">Experimental Flags</string>
<string name="revanced_extended_confirm_user_dialog_title">Do you wish to proceed?</string>
<string name="revanced_extended_restart_first_run">Restart to load the layout normally</string>
<string name="revanced_extended_restart_message">Refresh and restart</string>
<string name="revanced_playback_speed_normal">Normal</string>
<string name="revanced_external_downloader_package_name_video_title">Video downloader package name</string>
<string name="revanced_external_downloader_package_name_video_summary">Package name of your installed external downloader app, such as NewPipe or YTDLnis.</string>
<string name="revanced_external_downloader_dialog_title">External downloader</string>
<string name="revanced_external_downloader_not_installed_dialog_title">Warning</string>
<string name="revanced_external_downloader_not_installed_dialog_message">"%1$s is not installed.
Please download %2$s from the website."</string>
<string name="revanced_external_downloader_not_installed_warning">%s is not installed. Please install it.</string>
<!-- PreferenceScreen: Ads -->
<string name="revanced_preference_screen_ads_title">Ads</string>
@ -334,6 +341,16 @@ This does not bypass the age restriction. It just accepts it automatically."</st
<string name="revanced_enable_phone_layout_summary">Spoofs the dpi to use some phone layouts.</string>
<string name="revanced_enable_tablet_layout_title">Enable tablet layout</string>
<string name="revanced_enable_tablet_layout_summary">Spoofs the dpi to use some tablet layouts.</string>
<string name="revanced_override_video_download_button_title">Override video download button</string>
<string name="revanced_override_video_download_button_summary_on">Native video download button opens your external downloader.</string>
<string name="revanced_override_video_download_button_summary_off">Native video download button opens the native in-app downloader.</string>
<string name="revanced_override_playlist_download_button_title">Override playlist download button</string>
<string name="revanced_override_playlist_download_button_summary_on">Native playlist download button opens your external downloader.</string>
<string name="revanced_override_playlist_download_button_summary_off">Native playlist download button opens the native in-app downloader.</string>
<string name="revanced_external_downloader_package_name_playlist_title">Playlist downloader package name</string>
<string name="revanced_external_downloader_package_name_playlist_summary">Package name of your installed external downloader app, such as YTDLnis.</string>
<string name="revanced_spoof_app_version_title">Spoof app version</string>
<string name="revanced_spoof_app_version_summary_on">Version spoofed</string>
<string name="revanced_spoof_app_version_summary_off">Version not spoofed</string>
@ -505,9 +522,6 @@ You tab → View channel → Menu → Settings"</string>
Tap and hold to open YouTube settings."</string>
<string name="revanced_replace_toolbar_create_button_type_summary_off">"Tap to open YouTube settings.
Tap and hold to open RVX settings."</string>
<string name="revanced_hook_playlist_download_button_title">Override playlist download action</string>
<string name="revanced_hook_playlist_download_button_summary_off">Playlist download will behave like the original, and button might not appear.</string>
<string name="revanced_hook_playlist_download_button_summary_on">Playlist download button will be present, and the download will be handled by YTDLnis.</string>
<!-- PreferenceScreen: Player -->
@ -900,20 +914,6 @@ Tap and hold to undo."</string>
<string name="revanced_whitelist_sponsor_block">SponsorBlock</string>
<string name="revanced_whitelist_failure_generic">Failed to load channel information.</string>
<string name="revanced_external_downloader_package_name_title">External downloader package name</string>
<string name="revanced_external_downloader_package_name_summary">Package name of your installed external downloader app, such as NewPipe or YTDLnis.</string>
<string name="revanced_external_downloader_dialog_title">External downloader</string>
<string name="revanced_playlist_external_downloader_package_name_title">Playlist external downloader package name</string>
<string name="revanced_playlist_external_downloader_package_name_summary">Package name of your installed external downloader app used to download from playlists, currently only YTDLnis works.</string>
<string name="revanced_playlist_external_downloader_dialog_title">Playlist external downloader</string>
<string name="revanced_external_downloader_not_installed_dialog_title">Warning</string>
<string name="revanced_external_downloader_not_installed_dialog_message">"%1$s is not installed.
Please download %2$s from the website."</string>
<string name="revanced_external_downloader_not_installed_warning">%s is not installed. Please install it.</string>
<string name="revanced_external_downloader_action_title">Override download action button</string>
<string name="revanced_external_downloader_action_summary_on">Native download button opens your external downloader.</string>
<string name="revanced_external_downloader_action_summary_off">Native download button opens the native in-app downloader.</string>
<string name="revanced_overlay_button_speed_dialog_reset">Playback speed reset: %sx.</string>
<string name="revanced_overlay_button_not_allowed_warning">Tap and hold to change button state.</string>
<string name="revanced_share_copy_timestamp_success">Timestamp copied to clipboard. (%s)</string>

View File

@ -231,9 +231,10 @@
<SwitchPreference android:title="@string/revanced_enable_tablet_layout_title" android:key="revanced_enable_tablet_layout" android:summary="@string/revanced_enable_tablet_layout_summary" />SETTINGS: LAYOUT_SWITCH -->
<!-- SETTINGS: HOOK_DOWNLOAD_ACTIONS
<SwitchPreference android:title="@string/revanced_hook_playlist_download_button_title" android:key="revanced_hook_playlist_download_button" android:defaultValue="true" android:summaryOn="@string/revanced_hook_playlist_download_button_summary_on" android:summaryOff="@string/revanced_hook_playlist_download_button_summary_off"/>
<SwitchPreference android:title="@string/revanced_external_downloader_action_title" android:key="revanced_external_downloader_action" android:defaultValue="false" android:summaryOn="@string/revanced_external_downloader_action_summary_on" android:summaryOff="@string/revanced_external_downloader_action_summary_off" />
<app.revanced.integrations.youtube.settings.preference.ExternalPlaylistDownloaderPreference android:title="@string/revanced_playlist_external_downloader_package_name_title" android:key="revanced_playlist_external_downloader_package_name" android:summary="@string/revanced_playlist_external_downloader_package_name_summary" />SETTINGS: HOOK_DOWNLOAD_ACTIONS -->
<SwitchPreference android:title="@string/revanced_override_video_download_button_title" android:key="revanced_override_video_download_button" android:summaryOn="@string/revanced_override_video_download_button_summary_on" android:summaryOff="@string/revanced_override_video_download_button_summary_off" />
<SwitchPreference android:title="@string/revanced_override_playlist_download_button_title" android:key="revanced_override_playlist_download_button" android:summaryOn="@string/revanced_override_playlist_download_button_summary_on" android:summaryOff="@string/revanced_override_playlist_download_button_summary_off" />
<app.revanced.integrations.youtube.settings.preference.ExternalDownloaderVideoPreference android:title="@string/revanced_external_downloader_package_name_video_title" android:key="revanced_external_downloader_package_name_video" android:summary="@string/revanced_external_downloader_package_name_video_summary" />
<app.revanced.integrations.youtube.settings.preference.ExternalDownloaderPlaylistPreference android:title="@string/revanced_external_downloader_package_name_playlist_title" android:key="revanced_external_downloader_package_name_playlist" android:summary="@string/revanced_external_downloader_package_name_playlist_summary" />SETTINGS: HOOK_DOWNLOAD_ACTIONS -->
<!-- SETTINGS: SPOOF_APP_VERSION
<SwitchPreference android:title="@string/revanced_spoof_app_version_title" android:key="revanced_spoof_app_version" android:summaryOn="@string/revanced_spoof_app_version_summary_on" android:summaryOff="@string/revanced_spoof_app_version_summary_off" />
@ -386,9 +387,8 @@
<SwitchPreference android:title="@string/revanced_overlay_button_speed_dialog_title" android:key="revanced_overlay_button_speed_dialog" android:summary="@string/revanced_overlay_button_speed_dialog_summary" />
<SwitchPreference android:title="@string/revanced_overlay_button_time_ordered_playlist_title" android:key="revanced_overlay_button_time_ordered_playlist" android:summary="@string/revanced_overlay_button_time_ordered_playlist_summary" />
<SwitchPreference android:title="@string/revanced_overlay_button_whitelist_title" android:key="revanced_overlay_button_whitelist" android:summary="@string/revanced_overlay_button_whitelist_summary" />
<app.revanced.integrations.youtube.settings.preference.ExternalDownloaderPreference android:title="@string/revanced_external_downloader_package_name_title" android:key="revanced_external_downloader_package_name" android:summary="@string/revanced_external_downloader_package_name_summary" />
<app.revanced.integrations.youtube.settings.preference.WhitelistedChannelsPreference android:title="@string/revanced_whitelist_settings_title" android:key="revanced_whitelist_settings" android:summary="@string/revanced_whitelist_settings_summary" />
<PreferenceCategory android:title="@string/revanced_preference_category_experimental_flag" android:layout="@layout/revanced_settings_preferences_category" />SETTINGS: OVERLAY_BUTTONS -->
<app.revanced.integrations.youtube.settings.preference.ExternalDownloaderVideoPreference android:title="@string/revanced_external_downloader_package_name_video_title" android:key="revanced_external_downloader_package_name_video" android:summary="@string/revanced_external_downloader_package_name_video_summary" />
<app.revanced.integrations.youtube.settings.preference.WhitelistedChannelsPreference android:title="@string/revanced_whitelist_settings_title" android:key="revanced_whitelist_settings" android:summary="@string/revanced_whitelist_settings_summary" />SETTINGS: OVERLAY_BUTTONS -->
<!-- PREFERENCE_SCREENS: PLAYER_BUTTONS
</PreferenceScreen>PREFERENCE_SCREENS: PLAYER_BUTTONS -->
@ -695,6 +695,7 @@
<Preference android:title="Disable splash animation" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Enable gradient loading screen" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Hide layout components" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Hook download actions" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Layout switch" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Miniplayer" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="Navigation bar components" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>