mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-29 13:41:03 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e2d30228a | ||
|
|
dce28760f5 | ||
|
|
68ec6d2258 |
@@ -1,3 +1,11 @@
|
|||||||
|
# [2.63.0](https://github.com/revanced/revanced-patches/compare/v2.62.0...v2.63.0) (2022-09-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* `disable-auto-player-popup-panels` ([#543](https://github.com/revanced/revanced-patches/issues/543)) ([d1fa2c3](https://github.com/revanced/revanced-patches/commit/d1fa2c3bc359018146f1f90b1ed4448b7f19b247))
|
||||||
|
* disable sponsorblock on shorts ([#439](https://github.com/revanced/revanced-patches/issues/439)) ([47fbcba](https://github.com/revanced/revanced-patches/commit/47fbcba3f845b5c3ef35c4dded8d6f9ffafc5d9e))
|
||||||
|
|
||||||
# [2.62.0](https://github.com/revanced/revanced-patches/compare/v2.61.1...v2.62.0) (2022-09-21)
|
# [2.62.0](https://github.com/revanced/revanced-patches/compare/v2.61.1...v2.62.0) (2022-09-21)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `sponsorblock` | Integrate SponsorBlock. | 17.36.37 |
|
| `sponsorblock` | Integrate SponsorBlock. | 17.36.37 |
|
||||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.36.37 |
|
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.36.37 |
|
||||||
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.36.37 |
|
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.36.37 |
|
||||||
|
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.36.37 |
|
||||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.36.37 |
|
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.36.37 |
|
||||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.36.37 |
|
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.36.37 |
|
||||||
| `minimized-playback` | Enables minimized and background playback. | 17.36.37 |
|
| `minimized-playback` | Enables minimized and background playback. | 17.36.37 |
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.62.0
|
version = 2.63.0
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.playerpopuppanels.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[Package(
|
||||||
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
|
)]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class PlayerPopupPanelsCompatibility
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.playerpopuppanels.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
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.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.playerpopuppanels.annotations.PlayerPopupPanelsCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("engagement-player-controller-fingerprint")
|
||||||
|
@MatchingMethod("Lucf;", "L")
|
||||||
|
@FuzzyPatternScanMethod(3)
|
||||||
|
@PlayerPopupPanelsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object EngagementPanelControllerFingerprint : MethodFingerprint(
|
||||||
|
"L", AccessFlags.PRIVATE or AccessFlags.FINAL, listOf("L", "L", "Z", "Z", "Z"), listOf(
|
||||||
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.MOVE_FROM16,
|
||||||
|
Opcode.IGET_BOOLEAN,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.IF_NEZ,
|
||||||
|
Opcode.CONST_STRING,
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.CONST_STRING,
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.RETURN_OBJECT,
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.playerpopuppanels.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
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.patcher.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.youtube.layout.playerpopuppanels.annotations.PlayerPopupPanelsCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.playerpopuppanels.fingerprints.EngagementPanelControllerFingerprint
|
||||||
|
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.framework.components.impl.StringResource
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||||
|
@Name("disable-auto-player-popup-panels")
|
||||||
|
@Description("Disable automatic popup panels (playlist or live chat) on video player.")
|
||||||
|
@PlayerPopupPanelsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class PlayerPopupPanelsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
EngagementPanelControllerFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_player_popup_panels_enabled",
|
||||||
|
StringResource("revanced_player_popup_panels_title", "Disable player popup panels"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_player_popup_panels_summary_on", "Player popup panels are enabled"),
|
||||||
|
StringResource("revanced_player_popup_panels_summary_off", "Player popup panels are disabled")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
val engagementPanelControllerMethod = EngagementPanelControllerFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
engagementPanelControllerMethod.addInstructions(
|
||||||
|
0, """
|
||||||
|
invoke-static { }, Lapp/revanced/integrations/patches/DisablePlayerPopupPanelsPatch;->disablePlayerPopupPanels()Z
|
||||||
|
move-result v0
|
||||||
|
if-eqz v0, :player_popup_panels
|
||||||
|
if-eqz p4, :player_popup_panels
|
||||||
|
const/4 v0, 0x0
|
||||||
|
return-object v0
|
||||||
|
:player_popup_panels
|
||||||
|
nop
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
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.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("shorts-player-constructor-fingerprint")
|
||||||
|
@MatchingMethod("Lhgp;", "<init>")
|
||||||
|
@FuzzyPatternScanMethod(3)
|
||||||
|
@SponsorBlockCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object ShortsPlayerConstructorFingerprint : MethodFingerprint(
|
||||||
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.INVOKE_DIRECT_RANGE,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.INVOKE_DIRECT,
|
||||||
|
Opcode.IPUT_OBJECT
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -25,6 +25,7 @@ import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
|||||||
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
|
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
|
||||||
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
|
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
|
||||||
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
|
import app.revanced.patches.youtube.misc.videoid.patch.VideoIdPatch
|
||||||
|
import app.revanced.patches.youtube.layout.autocaptions.fingerprints.StartVideoInformerFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.builder.MutableMethodImplementation
|
import org.jf.dexlib2.builder.MutableMethodImplementation
|
||||||
@@ -53,7 +54,8 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
NextGenWatchLayoutFingerprint,
|
NextGenWatchLayoutFingerprint,
|
||||||
AppendTimeFingerprint,
|
AppendTimeFingerprint,
|
||||||
PlayerInitFingerprint,
|
PlayerInitFingerprint,
|
||||||
PlayerOverlaysLayoutInitFingerprint
|
PlayerOverlaysLayoutInitFingerprint,
|
||||||
|
ShortsPlayerConstructorFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {/*
|
override fun execute(data: BytecodeData): PatchResult {/*
|
||||||
@@ -324,6 +326,23 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val startVideoInformerMethod = StartVideoInformerFingerprint.result!!.mutableMethod
|
||||||
|
startVideoInformerMethod.addInstructions(
|
||||||
|
0, """
|
||||||
|
const/4 v0, 0x1
|
||||||
|
sput-boolean v0, Lapp/revanced/integrations/settings/SettingsEnum;->shorts_playing:Z
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
val shortsPlayerConstructorMethod = ShortsPlayerConstructorFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
shortsPlayerConstructorMethod.addInstructions(
|
||||||
|
0, """
|
||||||
|
const/4 v0, 0x0
|
||||||
|
sput-boolean v0, Lapp/revanced/integrations/settings/SettingsEnum;->shorts_playing:Z
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
// TODO: isSBChannelWhitelisting implementation
|
// TODO: isSBChannelWhitelisting implementation
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
|
|||||||
Reference in New Issue
Block a user