mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 05:37:40 +02:00
add spoof-version
patch: for YT Music users living in Canada.
This commit is contained in:
@ -0,0 +1,37 @@
|
|||||||
|
package app.revanced.patches.music.misc.versionspoof.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch
|
||||||
|
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||||
|
import app.revanced.patches.shared.patch.versionspoof.GeneralVersionSpoofPatch
|
||||||
|
import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("spoof-version")
|
||||||
|
@Description("Spoof the YouTube Music client version.")
|
||||||
|
@DependsOn(
|
||||||
|
[
|
||||||
|
GeneralVersionSpoofPatch::class,
|
||||||
|
MusicSettingsPatch::class
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@YouTubeMusicCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class SpoofAppVersionPatch : BytecodePatch() {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
|
||||||
|
GeneralVersionSpoofPatch.injectSpoof("$MUSIC_SETTINGS_PATH->spoofVersion(Ljava/lang/String;)Ljava/lang/String;")
|
||||||
|
|
||||||
|
MusicSettingsPatch.addMusicPreference("navigation", "revanced_enable_spoof_version", "false")
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
@ -12,12 +12,14 @@
|
|||||||
<string name="revanced_enable_color_match_player_title">Enable color match Players</string>
|
<string name="revanced_enable_color_match_player_title">Enable color match Players</string>
|
||||||
<string name="revanced_enable_force_minimized_player_summary">Keep player permanently minimized even if another track is played.</string>
|
<string name="revanced_enable_force_minimized_player_summary">Keep player permanently minimized even if another track is played.</string>
|
||||||
<string name="revanced_enable_force_minimized_player_title">Enable force minimized player</string>
|
<string name="revanced_enable_force_minimized_player_title">Enable force minimized player</string>
|
||||||
<string name="revanced_enable_force_shuffle_summary">"Enable force shuffle even if another track is played.
|
<string name="revanced_enable_force_shuffle_summary">Enable force shuffle even if another track is played.</string>
|
||||||
(Not available in Canada)"</string>
|
|
||||||
<string name="revanced_enable_force_shuffle_title">Enable force shuffle</string>
|
<string name="revanced_enable_force_shuffle_title">Enable force shuffle</string>
|
||||||
<string name="revanced_enable_opus_codec_summary">"Enable 250/251 opus codec when playing audio.
|
<string name="revanced_enable_opus_codec_summary">"Enable 250/251 opus codec when playing audio.
|
||||||
(requires an app restart)"</string>
|
(requires an app restart)"</string>
|
||||||
<string name="revanced_enable_opus_codec_title">Enable opus codec</string>
|
<string name="revanced_enable_opus_codec_title">Enable opus codec</string>
|
||||||
|
<string name="revanced_enable_spoof_version_summary">"Trick the YouTube Music version to v4.27.53 for Canadian users.
|
||||||
|
(requires an app restart)"</string>
|
||||||
|
<string name="revanced_enable_spoof_version_title">Enable version spoof</string>
|
||||||
<string name="revanced_enable_tablet_mode_summary">"Enable landscape mode on phone.
|
<string name="revanced_enable_tablet_mode_summary">"Enable landscape mode on phone.
|
||||||
(requires an app restart)"</string>
|
(requires an app restart)"</string>
|
||||||
<string name="revanced_enable_tablet_mode_title">Enable tablet mode</string>
|
<string name="revanced_enable_tablet_mode_title">Enable tablet mode</string>
|
||||||
|
Reference in New Issue
Block a user