feat(YouTube Music/Spoof app version): add target version 6.10.51 - disable real time lyrics

This commit is contained in:
inotia00
2023-10-09 23:35:41 +09:00
parent 1c941e5663
commit b8216e0105
3 changed files with 35 additions and 1 deletions

View File

@ -4,15 +4,19 @@ import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.music.general.oldstylelibraryshelf.OldStyleLibraryShelfPatch
import app.revanced.patches.music.utils.intenthook.IntentHookPatch
import app.revanced.patches.music.utils.settings.SettingsPatch
import app.revanced.patches.music.utils.settings.SettingsPatch.contexts
import app.revanced.patches.shared.patch.versionspoof.AbstractVersionSpoofPatch
import app.revanced.util.enum.CategoryType
import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
import app.revanced.util.resources.ResourceUtils.copyXmlNode
@Patch(
name = "Spoof app version",
description = "Spoof the YouTube Music client version.",
dependencies = [
IntentHookPatch::class,
OldStyleLibraryShelfPatch::class,
SettingsPatch::class
],
@ -35,11 +39,21 @@ object SpoofAppVersionPatch : AbstractVersionSpoofPatch(
override fun execute(context: BytecodeContext) {
super.execute(context)
/**
* Copy arrays
*/
contexts.copyXmlNode("music/spoofappversion/host", "values/arrays.xml", "resources")
SettingsPatch.addMusicPreference(
CategoryType.MISC,
"revanced_spoof_app_version",
"false"
)
SettingsPatch.addMusicPreferenceWithIntent(
CategoryType.MISC,
"revanced_spoof_app_version_target",
"revanced_spoof_app_version"
)
}
}