fix: Revert previous release

The previous release depends on a version of ReVanced Patcher which prevents usage of resource patches on lower Android versions. To solve this issue temporarily, until a fix is present, the previous release is reverted.
This commit is contained in:
oSumAtrIX
2023-08-27 04:37:21 +02:00
parent ce2e46a7cb
commit 3938f2f1b3
496 changed files with 2551 additions and 2425 deletions
@@ -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", "18.29.38", "18.32.39"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class ExternalDownloadsCompatibility
@@ -4,6 +4,8 @@ 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
@@ -21,7 +23,7 @@ class ExternalDownloadsBytecodePatch : BytecodePatch() {
const val BUTTON_DESCRIPTOR = "Lapp/revanced/integrations/videoplayer/ExternalDownloadButton;"
}
override fun execute(context: BytecodeContext) {
override fun execute(context: BytecodeContext): PatchResult {
/*
initialize the control
*/
@@ -35,5 +37,7 @@ class ExternalDownloadsBytecodePatch : BytecodePatch() {
PlayerControlsBytecodePatch.injectVisibilityCheckCall(
"$BUTTON_DESCRIPTOR->changeVisibility(Z)V")
return PatchResultSuccess()
}
}
@@ -1,6 +1,8 @@
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.*
@@ -13,7 +15,7 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings
@DependsOn([BottomControlsResourcePatch::class, SettingsPatch::class])
class ExternalDownloadsResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext) {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
PreferenceScreen(
"revanced_external_downloader_preference_screen",
@@ -28,7 +30,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 Seal"),
StringResource("revanced_external_downloader_name_summary", "Package name of your installed external downloader app, such as NewPipe or PowerTube"),
InputType.TEXT
)
),
@@ -45,5 +47,7 @@ class ExternalDownloadsResourcePatch : ResourcePatch {
// Add download button node
BottomControlsResourcePatch.addControls("downloads/host/layout/${BottomControlsResourcePatch.TARGET_RESOURCE_NAME}")
return PatchResultSuccess()
}
}
}