From 1bc0d73132d9c1be6076a0ab3426d165bdfb3a52 Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Fri, 18 Oct 2024 21:10:22 +0900 Subject: [PATCH] fix(YouTube/Hook YouTube Music actions): app crashes when first installed --- .../youtube/general/music/YouTubeMusicActionsPatch.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/music/YouTubeMusicActionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/general/music/YouTubeMusicActionsPatch.kt index 5c348be0b3..b62e7e57de 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/general/music/YouTubeMusicActionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/general/music/YouTubeMusicActionsPatch.kt @@ -8,6 +8,7 @@ import app.revanced.patches.youtube.general.music.fingerprints.AppDeepLinkFinger import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE import app.revanced.patches.youtube.utils.gms.GmsCoreSupportResourcePatch.PackageNameYouTubeMusic import app.revanced.patches.youtube.utils.integrations.Constants.GENERAL_PATH +import app.revanced.patches.youtube.utils.integrations.Constants.PATCH_STATUS_CLASS_DESCRIPTOR import app.revanced.patches.youtube.utils.settings.SettingsBytecodePatch import app.revanced.patches.youtube.utils.settings.SettingsPatch import app.revanced.util.addEntryValues @@ -91,8 +92,8 @@ object YouTubeMusicActionsPatch : BaseBytecodePatch( musicPackageName ) - SettingsBytecodePatch.contexts.findMethodOrThrow(INTEGRATIONS_CLASS_DESCRIPTOR) { - name == "getRVXMusicPackageName" + SettingsBytecodePatch.contexts.findMethodOrThrow(PATCH_STATUS_CLASS_DESCRIPTOR) { + name == "RVXMusicPackageName" }.apply { val replaceIndex = indexOfFirstInstructionOrThrow(Opcode.CONST_STRING) val replaceRegister =