From 84607ff5f4bd30d328cdc4e1d46070a86d6c56bf Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 5 Dec 2023 03:47:46 +0400 Subject: [PATCH] fix(YouTube - Minimized playback): Fix PIP incorrectly shown for some Shorts playback (#3364) --- .../misc/minimizedplayback/MinimizedPlaybackPatch.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt index 95e9d8d7f..3704443d1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt @@ -17,13 +17,19 @@ import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.Minimize import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.MinimizedPlaybackSettingsParentFingerprint import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch import app.revanced.patches.youtube.misc.settings.SettingsPatch +import app.revanced.patches.youtube.video.information.VideoInformationPatch import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.reference.MethodReference @Patch( name = "Minimized playback", description = "Enables minimized and background playback.", - dependencies = [IntegrationsPatch::class, PlayerTypeHookPatch::class, SettingsPatch::class], + dependencies = [ + IntegrationsPatch::class, + PlayerTypeHookPatch::class, + VideoInformationPatch::class, + SettingsPatch::class + ], compatiblePackages = [ CompatiblePackage( "com.google.android.youtube", @@ -65,7 +71,7 @@ object MinimizedPlaybackPatch : BytecodePatch( mutableMethod.addInstructions( 0, """ - invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->isPlaybackNotShort()Z + invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->playbackIsNotShort()Z move-result v0 return v0 """