diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/Fingerprints.kt index d66851054..f73cad02b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/Fingerprints.kt @@ -20,7 +20,8 @@ internal val userWasInShortsAlternativeFingerprint by fingerprint { checkCast("Ljava/lang/Boolean;"), methodCall(smali = "Ljava/lang/Boolean;->booleanValue()Z", maxAfter = 0), opcode(Opcode.MOVE_RESULT, maxAfter = 0), - string("userIsInShorts: ", maxAfter = 5) + // 20.40+ string was merged into another string and is a partial match. + string("userIsInShorts: ", partialMatch = true, maxAfter = 15) ) } diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/video/videoid/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/video/videoid/Fingerprints.kt index 9c8fbbc23..6c32e8eb0 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/video/videoid/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/video/videoid/Fingerprints.kt @@ -36,11 +36,10 @@ internal val videoIdBackgroundPlayFingerprint by fingerprint { opcode(Opcode.MONITOR_EXIT), opcode(Opcode.RETURN_VOID) ) - // The target snippet of code is buried in a huge switch block and the target method - // has been changed many times by YT which makes identifying it more difficult than usual. custom { method, classDef -> - classDef.methods.count() == 17 && - method.implementation != null + method.implementation != null && + (classDef.methods.count() == 17 // 20.39 and lower. + || classDef.methods.count() == 16) // 20.40+ } }