mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-29 05:31:02 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a25dc4fa2 | ||
|
|
7f1a918649 | ||
|
|
c26de68a27 | ||
|
|
9381508678 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
# [2.80.0](https://github.com/revanced/revanced-patches/compare/v2.79.2...v2.80.0) (2022-10-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **youtube/remember-video-quality:** remember current quality option ([9c510d4](https://github.com/revanced/revanced-patches/commit/9c510d472048f5bce127eb0329e53aaf259e9b1b))
|
||||||
|
|
||||||
|
## [2.79.2](https://github.com/revanced/revanced-patches/compare/v2.79.1...v2.79.2) (2022-10-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/disable-startup-shorts-player:** don't affect functionality of navigation bar ([#716](https://github.com/revanced/revanced-patches/issues/716)) ([05f5cc1](https://github.com/revanced/revanced-patches/commit/05f5cc17e3fcbf255c6fe5b503c9fd20c218f5a1))
|
||||||
|
|
||||||
## [2.79.1](https://github.com/revanced/revanced-patches/compare/v2.79.0...v2.79.1) (2022-10-03)
|
## [2.79.1](https://github.com/revanced/revanced-patches/compare/v2.79.0...v2.79.1) (2022-10-03)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.79.1
|
version = 2.80.0
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -3,6 +3,7 @@ package app.revanced.patches.youtube.layout.startupshortsreset.fingerprints
|
|||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.layout.startupshortsreset.annotations.StartupShortsResetCompatibility
|
import app.revanced.patches.youtube.layout.startupshortsreset.annotations.StartupShortsResetCompatibility
|
||||||
@@ -11,9 +12,20 @@ import org.jf.dexlib2.Opcode
|
|||||||
|
|
||||||
@Name("user-was-in-shorts-fingerprint")
|
@Name("user-was-in-shorts-fingerprint")
|
||||||
@MatchingMethod("Lkzb;", "e")
|
@MatchingMethod("Lkzb;", "e")
|
||||||
|
@FuzzyPatternScanMethod(3)
|
||||||
@StartupShortsResetCompatibility
|
@StartupShortsResetCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
object UserWasInShortsFingerprint : MethodFingerprint(
|
object UserWasInShortsFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"),
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.INVOKE_INTERFACE,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.CHECK_CAST,
|
||||||
|
Opcode.INVOKE_INTERFACE,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.INVOKE_INTERFACE,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
),
|
||||||
strings = listOf("Failed to read user_was_in_shorts proto after successful warmup"),
|
strings = listOf("Failed to read user_was_in_shorts proto after successful warmup"),
|
||||||
)
|
)
|
||||||
@@ -16,6 +16,7 @@ import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
|||||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||||
@@ -39,15 +40,17 @@ class DisableShortsOnStartupPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
val userWasInShortsMethod = UserWasInShortsFingerprint.result!!.mutableMethod
|
val userWasInShortsResult = UserWasInShortsFingerprint.result!!
|
||||||
|
val userWasInShortsMethod = userWasInShortsResult.mutableMethod
|
||||||
|
val moveResultIndex = userWasInShortsResult.scanResult.patternScanResult!!.endIndex
|
||||||
|
|
||||||
userWasInShortsMethod.addInstructions(
|
userWasInShortsMethod.addInstructions(
|
||||||
0, """
|
moveResultIndex + 1, """
|
||||||
invoke-static { }, Lapp/revanced/integrations/patches/DisableStartupShortsPlayerPatch;->disableStartupShortsPlayer()Z
|
invoke-static { }, Lapp/revanced/integrations/patches/DisableStartupShortsPlayerPatch;->disableStartupShortsPlayer()Z
|
||||||
move-result v0
|
move-result v5
|
||||||
if-eqz v0, :cond_startup_shorts_reset
|
if-eqz v5, :disable_shorts_player
|
||||||
return-void
|
return-void
|
||||||
:cond_startup_shorts_reset
|
:disable_shorts_player
|
||||||
nop
|
nop
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -17,12 +17,17 @@ import app.revanced.patches.youtube.misc.quality.annotations.DefaultVideoQuality
|
|||||||
import app.revanced.patches.youtube.misc.quality.fingerprints.VideoQualityReferenceFingerprint
|
import app.revanced.patches.youtube.misc.quality.fingerprints.VideoQualityReferenceFingerprint
|
||||||
import app.revanced.patches.youtube.misc.quality.fingerprints.VideoQualitySetterFingerprint
|
import app.revanced.patches.youtube.misc.quality.fingerprints.VideoQualitySetterFingerprint
|
||||||
import app.revanced.patches.youtube.misc.quality.fingerprints.VideoUserQualityChangeFingerprint
|
import app.revanced.patches.youtube.misc.quality.fingerprints.VideoUserQualityChangeFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsResourcePatch
|
||||||
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
|
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
|
import org.jf.dexlib2.iface.instruction.SwitchPayload
|
||||||
import org.jf.dexlib2.iface.reference.FieldReference
|
import org.jf.dexlib2.iface.reference.FieldReference
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@DependsOn([IntegrationsPatch::class, VideoIdPatch::class])
|
@DependsOn([IntegrationsPatch::class, VideoIdPatch::class, SettingsPatch::class])
|
||||||
@Name("remember-video-quality")
|
@Name("remember-video-quality")
|
||||||
@Description("Adds the ability to remember the video quality you chose in the video quality flyout.")
|
@Description("Adds the ability to remember the video quality you chose in the video quality flyout.")
|
||||||
@DefaultVideoQualityCompatibility
|
@DefaultVideoQualityCompatibility
|
||||||
@@ -33,7 +38,15 @@ class RememberVideoQualityPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
//TODO: include setting to skip remembering the new quality
|
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_remember_video_quality_selection",
|
||||||
|
StringResource("revanced_remember_video_quality_selection_title", "Remember current video quality"),
|
||||||
|
true,
|
||||||
|
StringResource("revanced_remember_video_quality_selection_summary_on", "The current video quality will not change"),
|
||||||
|
StringResource("revanced_remember_video_quality_selection_summary_off", "Video quality will be remembered until a new quality is chosen")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
val setterMethod = VideoQualitySetterFingerprint.result!!
|
val setterMethod = VideoQualitySetterFingerprint.result!!
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user