Compare commits

...

10 Commits

Author SHA1 Message Date
semantic-release-bot
7236dee006 chore(release): 2.196.1-dev.5 [skip ci]
## [2.196.1-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.4...v2.196.1-dev.5) (2023-11-10)

### Bug Fixes

* **Remove screenshot restriction:** Improve reliability ([#2938](https://github.com/ReVanced/revanced-patches/issues/2938)) ([f9b7c31](f9b7c31ba9))
2023-11-10 01:08:14 +00:00
Linus
f9b7c31ba9 fix(Remove screenshot restriction): Improve reliability (#2938)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-11-10 02:05:36 +01:00
semantic-release-bot
14017311f0 chore(release): 2.196.1-dev.4 [skip ci]
## [2.196.1-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.3...v2.196.1-dev.4) (2023-11-09)

### Bug Fixes

* **YouTube - SponsorBlock:** Rename "Preview/Recap" category to "Preview/Recap/Hook" ([#3245](https://github.com/ReVanced/revanced-patches/issues/3245)) ([79c2f04](79c2f04383))
2023-11-09 07:26:28 +00:00
Ajay Ramachandran
79c2f04383 fix(YouTube - SponsorBlock): Rename "Preview/Recap" category to "Preview/Recap/Hook" (#3245) 2023-11-09 08:23:46 +01:00
semantic-release-bot
1468edfbc8 chore(release): 2.196.1-dev.3 [skip ci]
## [2.196.1-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.2...v2.196.1-dev.3) (2023-11-06)

### Bug Fixes

* **Nyx Music Plaer - Unlock pro:** Constrain to last working version ([8ec276a](8ec276aac9))
2023-11-06 17:07:09 +00:00
oSumAtrIX
8ec276aac9 fix(Nyx Music Plaer - Unlock pro): Constrain to last working version 2023-11-06 18:04:24 +01:00
semantic-release-bot
4a7d723290 chore(release): 2.196.1-dev.2 [skip ci]
## [2.196.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.1...v2.196.1-dev.2) (2023-11-06)

### Bug Fixes

* **YouTube:** Rename `Restore old seekbar thumbnails` and `Restore old quality menu` ([#3235](https://github.com/ReVanced/revanced-patches/issues/3235)) ([0f242a6](0f242a6aaa))
2023-11-06 12:00:43 +00:00
LisoUseInAIKyrios
0f242a6aaa fix(YouTube): Rename Restore old seekbar thumbnails and Restore old quality menu (#3235) 2023-11-06 13:58:31 +02:00
semantic-release-bot
2fb76f779b chore(release): 2.196.1-dev.1 [skip ci]
## [2.196.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.196.0...v2.196.1-dev.1) (2023-11-06)

### Bug Fixes

* **YouTube - Theme:** Use consistent patch option descriptions ([#3231](https://github.com/ReVanced/revanced-patches/issues/3231)) ([278f204](278f204463))
2023-11-06 02:41:50 +00:00
KobeW50
278f204463 fix(YouTube - Theme): Use consistent patch option descriptions (#3231) 2023-11-06 03:38:49 +01:00
13 changed files with 118 additions and 32 deletions

View File

@@ -1,3 +1,38 @@
## [2.196.1-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.4...v2.196.1-dev.5) (2023-11-10)
### Bug Fixes
* **Remove screenshot restriction:** Improve reliability ([#2938](https://github.com/ReVanced/revanced-patches/issues/2938)) ([6b7cb7b](https://github.com/ReVanced/revanced-patches/commit/6b7cb7bd38348dbe4a56385356df6ed97e81c319))
## [2.196.1-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.3...v2.196.1-dev.4) (2023-11-09)
### Bug Fixes
* **YouTube - SponsorBlock:** Rename "Preview/Recap" category to "Preview/Recap/Hook" ([#3245](https://github.com/ReVanced/revanced-patches/issues/3245)) ([2cd2453](https://github.com/ReVanced/revanced-patches/commit/2cd2453658622f369b6449d5c8c33326384c2679))
## [2.196.1-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.2...v2.196.1-dev.3) (2023-11-06)
### Bug Fixes
* **Nyx Music Plaer - Unlock pro:** Constrain to last working version ([96d24a3](https://github.com/ReVanced/revanced-patches/commit/96d24a3e2ef6bd323aa44a05aaf122683898e90a))
## [2.196.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.196.1-dev.1...v2.196.1-dev.2) (2023-11-06)
### Bug Fixes
* **YouTube:** Rename `Restore old seekbar thumbnails` and `Restore old quality menu` ([#3235](https://github.com/ReVanced/revanced-patches/issues/3235)) ([7e3ffc8](https://github.com/ReVanced/revanced-patches/commit/7e3ffc88631da47a032cb29a4a30fd8f5679542d))
## [2.196.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.196.0...v2.196.1-dev.1) (2023-11-06)
### Bug Fixes
* **YouTube - Theme:** Use consistent patch option descriptions ([#3231](https://github.com/ReVanced/revanced-patches/issues/3231)) ([c84a940](https://github.com/ReVanced/revanced-patches/commit/c84a94075ecba11e826f0b311283ef530563fe93))
# [2.196.0](https://github.com/ReVanced/revanced-patches/compare/v2.195.0...v2.196.0) (2023-11-04)

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 2.196.0
version = 2.196.1-dev.5

File diff suppressed because one or more lines are too long

View File

@@ -1,14 +1,19 @@
package app.revanced.patches.all.screenshot.removerestriction
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.util.patch.AbstractTransformInstructionsPatch
import app.revanced.util.patch.IMethodCall
import app.revanced.util.patch.Instruction35cInfo
import app.revanced.util.patch.filterMapInstruction35c
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
@Patch(
name = "Remove screenshot restriction",
@@ -22,6 +27,11 @@ object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Ins
"Lapp/revanced/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
override fun execute(context: BytecodeContext) {
super.execute(context)
ModifyLayoutParamsFlags().execute(context)
}
override fun filterMap(
classDef: ClassDef,
method: Method,
@@ -46,6 +56,12 @@ object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Ins
override val methodParams: Array<String>,
override val returnType: String
): IMethodCall {
AddFlags(
"Landroid/view/Window;",
"addFlags",
arrayOf("I"),
"V",
),
SetFlags(
"Landroid/view/Window;",
"setFlags",
@@ -54,3 +70,37 @@ object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Ins
);
}
}
private class ModifyLayoutParamsFlags : AbstractTransformInstructionsPatch<Pair<Instruction22c, Int>>() {
override fun filterMap(
classDef: ClassDef,
method: Method,
instruction: Instruction,
instructionIndex: Int
): Pair<Instruction22c, Int>? {
if (instruction.opcode != Opcode.IPUT) {
return null
}
val instruction22c = instruction as Instruction22c
val fieldReference = instruction22c.reference as FieldReference
if (fieldReference.definingClass != "Landroid/view/WindowManager\$LayoutParams;"
|| fieldReference.name != "flags"
|| fieldReference.type != "I") {
return null
}
return Pair(instruction22c, instructionIndex)
}
override fun transform(mutableMethod: MutableMethod, entry: Pair<Instruction22c, Int>) {
val (instruction, index) = entry
val register = instruction.registerA
mutableMethod.addInstructions(
index,
"and-int/lit16 v$register, v$register, -0x2001"
)
}
}

View File

@@ -10,7 +10,7 @@ import app.revanced.patches.nyx.misc.pro.fingerprints.CheckProFingerprint
@Patch(
name = "Unlock pro",
compatiblePackages = [CompatiblePackage("com.awedea.nyx")]
compatiblePackages = [CompatiblePackage("com.awedea.nyx", ["2.2.7"])]
)
@Suppress("unused")
object UnlockProPatch : BytecodePatch(setOf(CheckProFingerprint)) {

View File

@@ -9,13 +9,13 @@ import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.layout.seekbar.fingerprints.EnableNewSeekbarThumbnailsFingerprint
import app.revanced.patches.youtube.layout.seekbar.fingerprints.FullscreenSeekbarThumbnailsFingerprint
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Patch(
name = "Enable old seekbar thumbnails",
description = "Enables the old seekbar thumbnails that appear above the seekbar instead of in fullscreen.",
name = "Restore old seekbar thumbnails",
description = "Restores the old seekbar thumbnails that appear above the seekbar instead of fullscreen thumbnails.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
@@ -27,38 +27,38 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
]
)
@Suppress("unused")
object EnableOldSeekbarThumbnailsPatch : BytecodePatch(
setOf(EnableNewSeekbarThumbnailsFingerprint)
object RestoreOldSeekbarThumbnailsPatch : BytecodePatch(
setOf(FullscreenSeekbarThumbnailsFingerprint)
) {
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/EnableOldSeekbarThumbnailsPatch;"
"Lapp/revanced/integrations/patches/RestoreOldSeekbarThumbnailsPatch;"
override fun execute(context: BytecodeContext) {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_enable_old_seekbar_thumbnails",
"revanced_restore_old_seekbar_thumbnails",
StringResource(
"revanced_enable_old_seekbar_thumbnails_title",
"Enable old seekbar thumbnails"
"revanced_restore_old_seekbar_thumbnails_title",
"Restore old seekbar thumbnails"
),
StringResource(
"revanced_enable_old_seekbar_thumbnails_summary_on",
"revanced_restore_old_seekbar_thumbnails_summary_on",
"Seekbar thumbnails will appear above the seekbar"
),
StringResource(
"revanced_enable_old_seekbar_thumbnails_summary_off",
"revanced_restore_old_seekbar_thumbnails_summary_off",
"Seekbar thumbnails will appear in fullscreen"
),
)
)
EnableNewSeekbarThumbnailsFingerprint.result?.mutableMethod?.apply {
FullscreenSeekbarThumbnailsFingerprint.result?.mutableMethod?.apply {
val moveResultIndex = getInstructions().lastIndex - 1
addInstruction(
moveResultIndex,
"invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->enableOldSeekbarThumbnails()Z"
"invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->useFullscreenSeekbarThumbnails()Z"
)
} ?: throw EnableNewSeekbarThumbnailsFingerprint.exception
} ?: throw FullscreenSeekbarThumbnailsFingerprint.exception
}
}

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
import app.revanced.util.patch.LiteralValueFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
object EnableNewSeekbarThumbnailsFingerprint : LiteralValueFingerprint(
object FullscreenSeekbarThumbnailsFingerprint : LiteralValueFingerprint(
returnType = "Z",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = emptyList(),

View File

@@ -82,7 +82,7 @@ object ThemeBytecodePatch : BytecodePatch(
"Light red" to "#FFFFD6D6"
),
title = "Light theme background color",
description = "Can be a hex color or a color resource reference.",
description = "Can be a hex color (#AARRGGBB) or a color resource reference.",
)
override fun execute(context: BytecodeContext) {

View File

@@ -13,11 +13,11 @@ import app.revanced.patches.youtube.video.videoqualitymenu.fingerprints.VideoQua
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Patch(
name = "Old video quality menu",
description = "Shows the old video quality with the advanced video quality options instead of the new one.",
name = "Restore old video quality menu",
description = "Restores the old video quality with advanced video quality options.",
dependencies = [
IntegrationsPatch::class,
OldVideoQualityMenuResourcePatch::class,
RestoreOldVideoQualityMenuResourcePatch::class,
LithoFilterPatch::class,
RecyclerViewTreeHookPatch::class
],
@@ -36,14 +36,14 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
]
)
@Suppress("unused")
object OldVideoQualityMenuPatch : BytecodePatch(
object RestoreOldVideoQualityMenuPatch : BytecodePatch(
setOf(VideoQualityMenuViewInflateFingerprint)
) {
private const val FILTER_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/components/VideoQualityMenuFilterPatch;"
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/playback/quality/OldVideoQualityMenuPatch;"
"Lapp/revanced/integrations/patches/playback/quality/RestoreOldVideoQualityMenuPatch;"
override fun execute(context: BytecodeContext) {
// region Patch for the old type of the video quality menu.

View File

@@ -12,16 +12,16 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Patch(
dependencies = [SettingsPatch::class, ResourceMappingPatch::class]
)
object OldVideoQualityMenuResourcePatch : ResourcePatch() {
object RestoreOldVideoQualityMenuResourcePatch : ResourcePatch() {
internal var videoQualityBottomSheetListFragmentTitle = -1L
override fun execute(context: ResourceContext) {
SettingsPatch.PreferenceScreen.VIDEO.addPreferences(
SwitchPreference(
"revanced_show_old_video_quality_menu",
StringResource("revanced_show_old_video_quality_menu_title", "Show old video quality menu"),
StringResource("revanced_show_old_video_quality_menu_summary_on", "Old video quality menu is shown"),
StringResource("revanced_show_old_video_quality_menu_summary_off", "New video quality menu is hidden")
"revanced_restore_old_video_quality_menu",
StringResource("revanced_restore_old_video_quality_menu_title", "Restore old video quality menu"),
StringResource("revanced_restore_old_video_quality_menu_summary_on", "Old video quality menu is shown"),
StringResource("revanced_restore_old_video_quality_menu_summary_off", "Old video quality menu is not shown")
)
)

View File

@@ -1,7 +1,7 @@
package app.revanced.patches.youtube.video.videoqualitymenu.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patches.youtube.video.videoqualitymenu.OldVideoQualityMenuResourcePatch
import app.revanced.patches.youtube.video.videoqualitymenu.RestoreOldVideoQualityMenuResourcePatch
import app.revanced.util.patch.LiteralValueFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
@@ -26,5 +26,5 @@ object VideoQualityMenuViewInflateFingerprint : LiteralValueFingerprint(
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST
),
literalSupplier = { OldVideoQualityMenuResourcePatch.videoQualityBottomSheetListFragmentTitle }
literalSupplier = { RestoreOldVideoQualityMenuResourcePatch.videoQualityBottomSheetListFragmentTitle }
)

View File

@@ -67,6 +67,7 @@ inline fun <reified E> fromMethodReference(methodReference: MethodReference)
search.definedClassName == methodReference.definingClass
&& search.methodName == methodReference.name
&& methodReference.parameterTypes.toTypedArray().contentEquals(search.methodParams)
&& search.returnType == methodReference.returnType
}
inline fun <reified E> filterMapInstruction35c(

View File

@@ -75,7 +75,7 @@
<string name="sb_segments_intro_sum">An interval without actual content. Could be a pause, static frame, or repeating animation. Does not include transitions containing information</string>
<string name="sb_segments_outro">Endcards/Credits</string>
<string name="sb_segments_outro_sum">Credits or when the YouTube endcards appear. Not for conclusions with information</string>
<string name="sb_segments_preview">Preview/Recap</string>
<string name="sb_segments_preview">Preview/Recap/Hook</string>
<string name="sb_segments_preview_sum">Collection of clips that show what is coming up or what happened in the video or in other videos of a series, where all information is repeated elsewhere</string>
<string name="sb_segments_filler">Filler Tangent/Jokes</string>
<string name="sb_segments_filler_sum">Tangential scenes added only for filler or humor that are not required to understand the main content of the video. Does not include segments providing context or background details</string>