fix(Boost for reddit - Fix missing audio in video downloads): Replace correct strings (#3379)

This commit is contained in:
Yan 2024-06-24 20:07:55 +03:00 committed by GitHub
parent 8d792d3f88
commit b43db98e84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@ object FixAudioMissingInDownloadsPatch : BytecodePatch(
) )
override fun execute(context: BytecodeContext) { override fun execute(context: BytecodeContext) {
DownloadAudioFingerprint.resultOrThrow().let { result -> DownloadAudioFingerprint.resultOrThrow().let { result ->
result.scanResult.stringsScanResult!!.matches.take(2).forEach { match -> result.scanResult.stringsScanResult!!.matches.forEach { match ->
result.mutableMethod.apply { result.mutableMethod.apply {
val replacement = endpointReplacements[match.string] val replacement = endpointReplacements[match.string]
val register = getInstruction<OneRegisterInstruction>(match.index).registerA val register = getInstruction<OneRegisterInstruction>(match.index).registerA

View file

@ -3,5 +3,5 @@ package app.revanced.patches.reddit.customclients.boostforreddit.fix.downloads.f
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
internal object DownloadAudioFingerprint : MethodFingerprint( internal object DownloadAudioFingerprint : MethodFingerprint(
strings = setOf("/DASH_audio.mp4", "/audio", "v.redd.it", "/"), strings = setOf("/DASH_audio.mp4", "/audio"),
) )