feat(YouTube - Spoof streaming data): Remove Use Android clients only setting, restore Force iOS AVC setting

This commit is contained in:
inotia00
2024-12-31 21:06:47 +09:00
parent 5d79826f4e
commit 83f2d82d0a
10 changed files with 90 additions and 174 deletions

View File

@ -1,5 +1,6 @@
package app.revanced.patches.music.utils.fix.streamingdata
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patches.music.utils.compatibility.Constants.COMPATIBLE_PACKAGE
import app.revanced.patches.music.utils.compatibility.Constants.YOUTUBE_MUSIC_PACKAGE_NAME
import app.revanced.patches.music.utils.patch.PatchList.SPOOF_STREAMING_DATA
@ -8,8 +9,10 @@ import app.revanced.patches.music.utils.settings.ResourceUtils.updatePatchStatus
import app.revanced.patches.music.utils.settings.addPreferenceWithIntent
import app.revanced.patches.music.utils.settings.addSwitchPreference
import app.revanced.patches.music.utils.settings.settingsPatch
import app.revanced.patches.shared.extension.Constants.PATCHES_PATH
import app.revanced.patches.shared.spoof.streamingdata.baseSpoofStreamingDataPatch
import app.revanced.patches.shared.spoof.useragent.baseSpoofUserAgentPatch
import app.revanced.util.findMethodOrThrow
@Suppress("unused")
val spoofStreamingDataPatch = baseSpoofStreamingDataPatch(
@ -22,6 +25,13 @@ val spoofStreamingDataPatch = baseSpoofStreamingDataPatch(
)
},
{
findMethodOrThrow("$PATCHES_PATH/PatchStatus;") {
name == "SpoofStreamingDataMusic"
}.replaceInstruction(
0,
"const/4 v0, 0x1"
)
addSwitchPreference(
CategoryType.MISC,
"revanced_spoof_streaming_data",

View File

@ -1,7 +1,5 @@
package app.revanced.patches.youtube.utils.fix.streamingdata
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patches.shared.extension.Constants.PATCHES_PATH
import app.revanced.patches.shared.spoof.streamingdata.baseSpoofStreamingDataPatch
import app.revanced.patches.shared.spoof.useragent.baseSpoofUserAgentPatch
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
@ -9,7 +7,6 @@ import app.revanced.patches.youtube.utils.compatibility.Constants.YOUTUBE_PACKAG
import app.revanced.patches.youtube.utils.patch.PatchList.SPOOF_STREAMING_DATA
import app.revanced.patches.youtube.utils.settings.ResourceUtils.addPreference
import app.revanced.patches.youtube.utils.settings.settingsPatch
import app.revanced.util.findMethodOrThrow
val spoofStreamingDataPatch = baseSpoofStreamingDataPatch(
{
@ -21,13 +18,6 @@ val spoofStreamingDataPatch = baseSpoofStreamingDataPatch(
)
},
{
findMethodOrThrow("$PATCHES_PATH/PatchStatus;") {
name == "SpoofStreamingDataAndroidOnlyDefaultBoolean"
}.replaceInstruction(
0,
"const/4 v0, 0x1"
)
addPreference(
arrayOf(
"SETTINGS: SPOOF_STREAMING_DATA"