mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-04-30 06:34:37 +02:00
chore(YouTube/PlayerType): supplement PlayerType limits under certain conditions
This commit is contained in:
parent
de5ddb903e
commit
3de0e75f3e
@ -7,6 +7,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.shared.litho.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.utils.integrations.Constants.COMPONENTS_PATH
|
||||
import app.revanced.patches.youtube.utils.integrations.Constants.SHARED_PATH
|
||||
import app.revanced.patches.youtube.utils.integrations.Constants.UTILS_PATH
|
||||
import app.revanced.patches.youtube.utils.playertype.fingerprint.ActionBarSearchResultsFingerprint
|
||||
@ -29,7 +31,12 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||
|
||||
@Patch(dependencies = [SharedResourceIdPatch::class])
|
||||
@Patch(
|
||||
dependencies = [
|
||||
SharedResourceIdPatch::class,
|
||||
LithoFilterPatch::class
|
||||
]
|
||||
)
|
||||
object PlayerTypeHookPatch : BytecodePatch(
|
||||
setOf(
|
||||
ActionBarSearchResultsFingerprint,
|
||||
@ -45,6 +52,9 @@ object PlayerTypeHookPatch : BytecodePatch(
|
||||
private const val INTEGRATIONS_ROOT_VIEW_HOOK_CLASS_DESCRIPTOR =
|
||||
"$SHARED_PATH/RootView;"
|
||||
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$COMPONENTS_PATH/RelatedVideoFilter;"
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
// region patch for set player type
|
||||
@ -153,5 +163,7 @@ object PlayerTypeHookPatch : BytecodePatch(
|
||||
|
||||
// endregion
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user