From b43db98e8483e2939d8fb9cd02443f24aeaae3c3 Mon Sep 17 00:00:00 2001 From: Yan <15308404+OctoNezd@users.noreply.github.com> Date: Mon, 24 Jun 2024 20:07:55 +0300 Subject: [PATCH] fix(Boost for reddit - Fix missing audio in video downloads): Replace correct strings (#3379) --- .../fix/downloads/FixAudioMissingInDownloadsPatch.kt | 2 +- .../fix/downloads/fingerprints/DownloadAudioFingerprint.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/FixAudioMissingInDownloadsPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/FixAudioMissingInDownloadsPatch.kt index 10356965..68438b09 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/FixAudioMissingInDownloadsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/FixAudioMissingInDownloadsPatch.kt @@ -25,7 +25,7 @@ object FixAudioMissingInDownloadsPatch : BytecodePatch( ) override fun execute(context: BytecodeContext) { DownloadAudioFingerprint.resultOrThrow().let { result -> - result.scanResult.stringsScanResult!!.matches.take(2).forEach { match -> + result.scanResult.stringsScanResult!!.matches.forEach { match -> result.mutableMethod.apply { val replacement = endpointReplacements[match.string] val register = getInstruction(match.index).registerA diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/fingerprints/DownloadAudioFingerprint.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/fingerprints/DownloadAudioFingerprint.kt index b5261523..ebf06641 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/fingerprints/DownloadAudioFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/fingerprints/DownloadAudioFingerprint.kt @@ -3,5 +3,5 @@ package app.revanced.patches.reddit.customclients.boostforreddit.fix.downloads.f import app.revanced.patcher.fingerprint.MethodFingerprint internal object DownloadAudioFingerprint : MethodFingerprint( - strings = setOf("/DASH_audio.mp4", "/audio", "v.redd.it", "/"), + strings = setOf("/DASH_audio.mp4", "/audio"), )