+1
-1
@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.interaction.downloads.annotation
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ExternalDownloadsCompatibility
|
||||
|
||||
|
||||
+1
-5
@@ -4,8 +4,6 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
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.patches.youtube.interaction.downloads.annotation.ExternalDownloadsCompatibility
|
||||
@@ -23,7 +21,7 @@ class ExternalDownloadsBytecodePatch : BytecodePatch() {
|
||||
const val BUTTON_DESCRIPTOR = "Lapp/revanced/integrations/videoplayer/ExternalDownloadButton;"
|
||||
}
|
||||
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
/*
|
||||
initialize the control
|
||||
*/
|
||||
@@ -37,7 +35,5 @@ class ExternalDownloadsBytecodePatch : BytecodePatch() {
|
||||
|
||||
PlayerControlsBytecodePatch.injectVisibilityCheckCall(
|
||||
"$BUTTON_DESCRIPTOR->changeVisibility(Z)V")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
+3
-7
@@ -1,8 +1,6 @@
|
||||
package app.revanced.patches.youtube.interaction.downloads.resource.patch
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.settings.preference.impl.*
|
||||
@@ -15,7 +13,7 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings
|
||||
@DependsOn([BottomControlsResourcePatch::class, SettingsPatch::class])
|
||||
class ExternalDownloadsResourcePatch : ResourcePatch {
|
||||
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
override fun execute(context: ResourceContext) {
|
||||
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||
PreferenceScreen(
|
||||
"revanced_external_downloader_preference_screen",
|
||||
@@ -30,7 +28,7 @@ class ExternalDownloadsResourcePatch : ResourcePatch {
|
||||
TextPreference(
|
||||
"revanced_external_downloader_name",
|
||||
StringResource("revanced_external_downloader_name_title", "Downloader package name"),
|
||||
StringResource("revanced_external_downloader_name_summary", "Package name of your installed external downloader app, such as NewPipe or PowerTube"),
|
||||
StringResource("revanced_external_downloader_name_summary", "Package name of your installed external downloader app, such as NewPipe or Seal"),
|
||||
InputType.TEXT
|
||||
)
|
||||
),
|
||||
@@ -47,7 +45,5 @@ class ExternalDownloadsResourcePatch : ResourcePatch {
|
||||
|
||||
// Add download button node
|
||||
BottomControlsResourcePatch.addControls("downloads/host/layout/${BottomControlsResourcePatch.TARGET_RESOURCE_NAME}")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user