feat(YouTube/Player components): add Disable switch mix playlists setting

This commit is contained in:
inotia00
2024-09-05 17:39:22 +09:00
parent 94f7c5b79a
commit fc832e2459
5 changed files with 25 additions and 4 deletions

View File

@ -46,6 +46,7 @@ import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.Scrim
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.SeekUndoEduOverlayStub
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.TapBloomView
import app.revanced.patches.youtube.utils.settings.SettingsPatch
import app.revanced.patches.youtube.video.information.VideoInformationPatch
import app.revanced.util.REGISTER_TEMPLATE_REPLACEMENT
import app.revanced.util.getTargetIndexOrThrow
import app.revanced.util.getTargetIndexReversedOrThrow
@ -73,6 +74,7 @@ object PlayerComponentsPatch : BaseBytecodePatch(
SharedResourceIdPatch::class,
SpeedOverlayPatch::class,
SuggestedVideoEndScreenPatch::class,
VideoInformationPatch::class
),
compatiblePackages = COMPATIBLE_PACKAGE,
fingerprints = setOf(
@ -172,6 +174,12 @@ object PlayerComponentsPatch : BaseBytecodePatch(
// endregion
// region patch for disable auto switch mix playlists
VideoInformationPatch.hook("$PLAYER_CLASS_DESCRIPTOR->disableAutoSwitchMixPlaylists(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JZ)V")
// endregion
// region patch for hide channel watermark
WatermarkFingerprint.resolve(