mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-07 18:14:36 +02:00
refactor(music): renamed some patches
This commit is contained in:
parent
bf643c23c5
commit
cd8adce32b
@ -9,8 +9,8 @@ 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.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.MusicLithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.patch.videoads.AbstractVideoAdsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
@ -20,19 +20,19 @@ import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
@Description("Removes ads in the music player.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicLithoFilterPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MusicVideoAdsPatch : AbstractVideoAdsPatch(
|
||||
class VideoAdsPatch : AbstractVideoAdsPatch(
|
||||
"$MUSIC_ADS_PATH/HideMusicAdsPatch;->hideMusicAds()Z"
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
super.execute(context)
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(CategoryType.ADS, "revanced_hide_music_ads", "true")
|
||||
SettingsPatch.addMusicPreference(CategoryType.ADS, "revanced_hide_music_ads", "true")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
@ -13,7 +13,7 @@ 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.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.fingerprints.captions.SubtitleTrackFingerprint
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
@ -22,7 +22,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@Patch
|
||||
@Name("disable-auto-captions")
|
||||
@Description("Disable forced captions from automatically enabling in video player.")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class DisableAutoCaptionsPatch : BytecodePatch(
|
||||
@ -44,7 +44,7 @@ class DisableAutoCaptionsPatch : BytecodePatch(
|
||||
}
|
||||
} ?: return SubtitleTrackFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_disable_auto_captions",
|
||||
"false"
|
||||
|
@ -15,7 +15,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.blacknavbar.fingerprints.TabLayoutFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@Description("Sets the navigation bar color to black.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicSettingsPatch::class,
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@ -50,7 +50,7 @@ class BlackNavbarPatch : BytecodePatch(
|
||||
}
|
||||
} ?: return TabLayoutFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_enable_black_navbar",
|
||||
"true"
|
||||
|
@ -13,11 +13,11 @@ import app.revanced.util.resources.IconHelper.customIconMusic
|
||||
import app.revanced.util.resources.IconHelper.customIconMusicAdditional
|
||||
|
||||
@Patch(false)
|
||||
@Name("custom-branding-music-mmt")
|
||||
@Name("custom-branding-icon-mmt")
|
||||
@Description("Changes the YouTube Music launcher icon to MMT.")
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class CustomBrandingMusicIconMMTPatch : ResourcePatch {
|
||||
class CustomBrandingIconMMTPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
|
||||
context.customIconMusic("mmt")
|
@ -12,11 +12,11 @@ import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.util.resources.IconHelper.customIconMusic
|
||||
|
||||
@Patch
|
||||
@Name("custom-branding-music-revancify-blue")
|
||||
@Name("custom-branding-icon-revancify-blue")
|
||||
@Description("Changes the YouTube Music launcher icon to Revancify Blue.")
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class CustomBrandingMusicIconRevancifyBluePatch : ResourcePatch {
|
||||
class CustomBrandingIconRevancifyBluePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
|
||||
context.customIconMusic("revancify-blue")
|
@ -12,11 +12,11 @@ import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.util.resources.IconHelper.customIconMusic
|
||||
|
||||
@Patch(false)
|
||||
@Name("custom-branding-music-revancify-red")
|
||||
@Name("custom-branding-icon-revancify-red")
|
||||
@Description("Changes the YouTube Music launcher icon to Revancify Red.")
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class CustomBrandingMusicIconRevancifyRedPatch : ResourcePatch {
|
||||
class CustomBrandingIconRevancifyRedPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
|
||||
context.customIconMusic("revancify-red")
|
@ -19,7 +19,7 @@ import org.w3c.dom.Element
|
||||
@Description("Changes the Music launcher name to your choice (defaults to YTM Extended, ReVanced Music Extended).")
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class CustomBrandingMusicNamePatch : ResourcePatch {
|
||||
class CustomBrandingNamePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
|
||||
// App name
|
@ -10,8 +10,8 @@ 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.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.MusicLithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch
|
||||
@ -19,8 +19,8 @@ import app.revanced.util.enum.CategoryType
|
||||
@Description("Hides the button shelf from homepage and explorer.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicLithoFilterPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
@ -28,7 +28,7 @@ import app.revanced.util.enum.CategoryType
|
||||
class HideButtonShelfPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_hide_button_shelf",
|
||||
"false"
|
||||
|
@ -10,8 +10,8 @@ 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.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.MusicLithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch
|
||||
@ -19,8 +19,8 @@ import app.revanced.util.enum.CategoryType
|
||||
@Description("Hides the carousel shelf from homepage and explorer.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicLithoFilterPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
@ -28,7 +28,7 @@ import app.revanced.util.enum.CategoryType
|
||||
class HideCarouselShelfPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_hide_carousel_shelf",
|
||||
"false"
|
||||
|
@ -15,14 +15,14 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.castbutton.fingerprints.HideCastButtonFingerprint
|
||||
import app.revanced.patches.music.layout.castbutton.fingerprints.HideCastButtonParentFingerprint
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
|
||||
@Patch
|
||||
@Name("hide-music-cast-button")
|
||||
@Name("hide-cast-button")
|
||||
@Description("Hides the cast button in the video player and header.")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideCastButtonPatch : BytecodePatch(
|
||||
@ -44,7 +44,7 @@ class HideCastButtonPatch : BytecodePatch(
|
||||
) ?: return HideCastButtonFingerprint.toErrorResult()
|
||||
} ?: return HideCastButtonParentFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_hide_cast_button",
|
||||
"true"
|
||||
|
@ -15,7 +15,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.categorybar.fingerprints.ChipCloudFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -25,8 +25,8 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@Description("Hides the music category bar at the top of the homepage.")
|
||||
@DependsOn(
|
||||
[
|
||||
SharedResourceIdPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
@ -47,7 +47,7 @@ class CategoryBarPatch : BytecodePatch(
|
||||
}
|
||||
} ?: return ChipCloudFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_hide_category_bar",
|
||||
"true"
|
||||
|
@ -18,7 +18,7 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.colormatchplayer.fingerprints.ColorMatchPlayerFingerprint
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.fingerprints.ColorMatchPlayerParentFingerprint
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
@ -28,7 +28,7 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
@Patch
|
||||
@Name("enable-color-match-player")
|
||||
@Description("Matches the fullscreen player color with the minimized one.")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class ColorMatchPlayerPatch : BytecodePatch(
|
||||
@ -77,7 +77,7 @@ class ColorMatchPlayerPatch : BytecodePatch(
|
||||
} ?: return ColorMatchPlayerFingerprint.toErrorResult()
|
||||
} ?: return ColorMatchPlayerParentFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_enable_color_match_player",
|
||||
"true"
|
||||
|
@ -16,7 +16,7 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.compactdialog.fingerprints.DialogSolidFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
|
||||
@ -26,7 +26,7 @@ import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
@Description("Enable compact dialog on phone.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicSettingsPatch::class,
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@ -52,7 +52,7 @@ class CompactDialogPatch : BytecodePatch(
|
||||
}
|
||||
} ?: return DialogSolidFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_enable_compact_dialog",
|
||||
"true"
|
||||
|
@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.dismissqueue.fingerprints.DismissQueueFingerprint
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -22,7 +22,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@Patch
|
||||
@Name("enable-dismiss-queue")
|
||||
@Description("Add dismiss queue to flyout menu. (YT Music v6.04.51+)")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class DismissQueuePatch : BytecodePatch(
|
||||
@ -44,7 +44,7 @@ class DismissQueuePatch : BytecodePatch(
|
||||
}
|
||||
} ?: return DismissQueueFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_enable_dismiss_queue",
|
||||
"true"
|
||||
|
@ -18,7 +18,7 @@ import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.floatingbutton.fingerprints.FloatingButtonFingerprint
|
||||
import app.revanced.patches.music.layout.floatingbutton.fingerprints.FloatingButtonParentFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
|
||||
@ -27,7 +27,7 @@ import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
@Description("Hide the New Playlist button in the Library tab.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicSettingsPatch::class,
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@ -58,7 +58,7 @@ class NewPlaylistButtonPatch : BytecodePatch(
|
||||
} ?: return FloatingButtonFingerprint.toErrorResult()
|
||||
} ?: return FloatingButtonParentFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_hide_new_playlist_button",
|
||||
"false"
|
||||
|
@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.landscapemode.fingerprints.TabletIdentifierFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
|
||||
@ -23,7 +23,7 @@ import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
@Description("Enables entry into landscape mode by screen rotation on the phone.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicSettingsPatch::class,
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@ -42,7 +42,7 @@ class LandScapeModePatch : BytecodePatch(
|
||||
)
|
||||
} ?: return TabletIdentifierFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_enable_landscape_mode",
|
||||
"true"
|
||||
|
@ -13,7 +13,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.minimizedplayer.fingerprints.MinimizedPlayerFingerprint
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -21,7 +21,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@Patch
|
||||
@Name("enable-force-minimized-player")
|
||||
@Description("Permanently keep player minimized even if another track is played.")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MinimizedPlayerPatch : BytecodePatch(
|
||||
@ -44,7 +44,7 @@ class MinimizedPlayerPatch : BytecodePatch(
|
||||
}
|
||||
} ?: return MinimizedPlayerFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_enable_force_minimized_player",
|
||||
"true"
|
||||
|
@ -17,8 +17,8 @@ import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.navigationlabel.fingerprints.TabLayoutTextFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.Text1
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch.Companion.contexts
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch.Companion.contexts
|
||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
@ -30,8 +30,8 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
@Description("Hide navigation bar labels.")
|
||||
@DependsOn(
|
||||
[
|
||||
SharedResourceIdPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
@ -68,7 +68,7 @@ class NavigationLabelPatch : BytecodePatch(
|
||||
}
|
||||
}
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_hide_navigation_label",
|
||||
"false"
|
||||
|
@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.newlayout.fingerprints.NewLayoutFingerprint
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -22,7 +22,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@Patch
|
||||
@Name("enable-new-layout")
|
||||
@Description("Enable new player layouts. (YT Music v5.47.51+)")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class NewLayoutPatch : BytecodePatch(
|
||||
@ -44,7 +44,7 @@ class NewLayoutPatch : BytecodePatch(
|
||||
}
|
||||
} ?: return NewLayoutFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_enable_new_layout",
|
||||
"false"
|
||||
|
@ -16,7 +16,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.oldstyleminiplayer.fingerprints.NextButtonVisibilityFingerprint
|
||||
import app.revanced.patches.music.layout.oldstyleminiplayer.fingerprints.SwipeToCloseFingerprint
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.fingerprints.ColorMatchPlayerParentFingerprint
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@Patch
|
||||
@Name("enable-old-style-miniplayer")
|
||||
@Description("Return the miniplayers to old style. (for YT Music v5.55.53+)")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class OldStyleMiniPlayerPatch : BytecodePatch(
|
||||
@ -72,7 +72,7 @@ class OldStyleMiniPlayerPatch : BytecodePatch(
|
||||
}
|
||||
} ?: return SwipeToCloseFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_enable_old_style_mini_player",
|
||||
"false"
|
||||
|
@ -10,8 +10,8 @@ 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.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.MusicLithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch
|
||||
@ -19,8 +19,8 @@ import app.revanced.util.enum.CategoryType
|
||||
@Description("Hides the playlist card from homepage.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicLithoFilterPatch::class,
|
||||
MusicSettingsPatch::class
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
@ -28,7 +28,7 @@ import app.revanced.util.enum.CategoryType
|
||||
class HidePlaylistCardPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_hide_playlist_card",
|
||||
"false"
|
||||
|
@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.sleeptimer.fingerprints.SleepTimerFingerprint
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -22,7 +22,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@Patch
|
||||
@Name("enable-sleep-timer")
|
||||
@Description("Add sleep timer to flyout menu.")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class SleepTimerPatch : BytecodePatch(
|
||||
@ -44,7 +44,7 @@ class SleepTimerPatch : BytecodePatch(
|
||||
}
|
||||
} ?: return SleepTimerFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_enable_sleep_timer",
|
||||
"true"
|
||||
|
@ -16,7 +16,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.zenmode.fingerprints.ZenModeFingerprint
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.fingerprints.ColorMatchPlayerParentFingerprint
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_LAYOUT
|
||||
@ -26,7 +26,7 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
@Patch
|
||||
@Name("enable-zen-mode")
|
||||
@Description("Adds a grey tint to the video player to reduce eye strain.")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class ZenModePatch : BytecodePatch(
|
||||
@ -68,7 +68,7 @@ class ZenModePatch : BytecodePatch(
|
||||
} ?: return ZenModeFingerprint.toErrorResult()
|
||||
} ?: return ColorMatchPlayerParentFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.LAYOUT,
|
||||
"revanced_enable_zen_mode",
|
||||
"false"
|
||||
|
@ -9,7 +9,7 @@ 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.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.patch.opus.AbstractOpusCodecsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
@ -17,7 +17,7 @@ import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
@Patch
|
||||
@Name("enable-opus-codec")
|
||||
@Description("Enable opus codec when playing audio.")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class CodecsUnlockPatch : AbstractOpusCodecsPatch(
|
||||
@ -26,7 +26,7 @@ class CodecsUnlockPatch : AbstractOpusCodecsPatch(
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
super.execute(context)
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_enable_opus_codec",
|
||||
"true"
|
||||
|
@ -20,8 +20,8 @@ import app.revanced.patches.music.misc.quality.fingerprints.MusicVideoQualitySet
|
||||
import app.revanced.patches.music.misc.quality.fingerprints.MusicVideoQualitySettingsParentFingerprint
|
||||
import app.revanced.patches.music.misc.quality.fingerprints.UserQualityChangeFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.videoid.patch.MusicVideoIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.videoid.patch.VideoIdPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
import org.jf.dexlib2.Opcode
|
||||
@ -36,9 +36,9 @@ import org.jf.dexlib2.iface.reference.Reference
|
||||
@Description("Save the video quality value whenever you change the video quality.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicSettingsPatch::class,
|
||||
MusicVideoIdPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class,
|
||||
VideoIdPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
@ -101,8 +101,8 @@ class VideoQualityPatch : BytecodePatch(
|
||||
) ?: return MusicVideoQualitySettingsFingerprint.toErrorResult()
|
||||
} ?: return MusicVideoQualitySettingsParentFingerprint.toErrorResult()
|
||||
|
||||
MusicVideoIdPatch.injectCall("$INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;)V")
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
VideoIdPatch.injectCall("$INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;)V")
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_enable_save_video_quality",
|
||||
"true"
|
||||
@ -113,7 +113,7 @@ class VideoQualityPatch : BytecodePatch(
|
||||
|
||||
private companion object {
|
||||
const val INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_MISC_PATH/MusicVideoQualityPatch;"
|
||||
"$MUSIC_MISC_PATH/VideoQualityPatch;"
|
||||
|
||||
private lateinit var qIndexMethodName: String
|
||||
private lateinit var qualityReference: Reference
|
||||
|
@ -20,8 +20,8 @@ import app.revanced.patches.music.misc.sharebuttonhook.fingerprints.ConnectionTr
|
||||
import app.revanced.patches.music.misc.sharebuttonhook.fingerprints.FullStackTraceActivityFingerprint
|
||||
import app.revanced.patches.music.misc.sharebuttonhook.fingerprints.SharePanelFingerprint
|
||||
import app.revanced.patches.music.misc.sharebuttonhook.fingerprints.ShowToastFingerprint
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.videoid.patch.MusicVideoIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.videoid.patch.VideoIdPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_INTEGRATIONS_PATH
|
||||
import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
@ -31,8 +31,8 @@ import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
@Description("Replace share button with external download button or sleep timer dialog.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicSettingsPatch::class,
|
||||
MusicVideoIdPatch::class
|
||||
SettingsPatch::class,
|
||||
VideoIdPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
@ -80,12 +80,12 @@ class ShareButtonHookPatch : BytecodePatch(
|
||||
"""
|
||||
) ?: return FullStackTraceActivityFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_hook_share_button",
|
||||
"false"
|
||||
)
|
||||
MusicSettingsPatch.addMusicPreferenceWithIntent(
|
||||
SettingsPatch.addMusicPreferenceWithIntent(
|
||||
CategoryType.MISC,
|
||||
"revanced_default_downloader",
|
||||
"revanced_hook_share_button"
|
||||
|
@ -24,7 +24,7 @@ import app.revanced.patches.music.misc.shuffle.fingerprints.MusicPlaybackControl
|
||||
import app.revanced.patches.music.misc.shuffle.fingerprints.ShuffleClassFingerprint
|
||||
import app.revanced.patches.music.misc.shuffle.fingerprints.ShuffleClassReferenceFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
@ -42,7 +42,7 @@ import org.jf.dexlib2.immutable.ImmutableMethodParameter
|
||||
@Description("Enable force shuffle even if another track is played.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicSettingsPatch::class,
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
@ -165,7 +165,7 @@ class EnforceShufflePatch : BytecodePatch(
|
||||
}
|
||||
} ?: return MusicPlaybackControlsFingerprint.toErrorResult()
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_enable_force_shuffle",
|
||||
"true"
|
||||
|
@ -10,13 +10,13 @@ import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.resources.ResourceHelper.addTranslations
|
||||
|
||||
@Patch
|
||||
@Name("translations-music")
|
||||
@Description("Add Crowdin translations for YouTube Music.")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MusicTranslationsPatch : ResourcePatch {
|
||||
|
@ -17,7 +17,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.misc.upgradebutton.fingerprints.NotifierShelfFingerprint
|
||||
import app.revanced.patches.music.misc.upgradebutton.fingerprints.PivotBarConstructorFingerprint
|
||||
import app.revanced.patches.music.utils.integrations.patch.MusicIntegrationsPatch
|
||||
import app.revanced.patches.music.utils.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
@ -28,7 +28,7 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
@Description("Remove upgrade tab from pivot bar, hide upgrade banner from homepage.")
|
||||
@DependsOn(
|
||||
[
|
||||
MusicIntegrationsPatch::class,
|
||||
IntegrationsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
]
|
||||
)
|
||||
|
@ -9,7 +9,7 @@ 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.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.MusicSettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.patch.versionspoof.AbstractVersionSpoofPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
@ -17,7 +17,7 @@ import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
@Patch
|
||||
@Name("spoof-app-version")
|
||||
@Description("Spoof the YouTube Music client version.")
|
||||
@DependsOn([MusicSettingsPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class SpoofAppVersionPatch : AbstractVersionSpoofPatch(
|
||||
@ -25,7 +25,7 @@ class SpoofAppVersionPatch : AbstractVersionSpoofPatch(
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
MusicSettingsPatch.addMusicPreference(
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_spoof_app_version",
|
||||
"false"
|
||||
|
@ -7,10 +7,10 @@ import app.revanced.patches.music.utils.integrations.fingerprints.InitFingerprin
|
||||
import app.revanced.patches.shared.patch.integrations.AbstractIntegrationsPatch
|
||||
import app.revanced.util.integrations.Constants.MUSIC_INTEGRATIONS_PATH
|
||||
|
||||
@Name("music-integrations")
|
||||
@Name("integrations")
|
||||
@MusicCompatibility
|
||||
@RequiresIntegrations
|
||||
class MusicIntegrationsPatch : AbstractIntegrationsPatch(
|
||||
class IntegrationsPatch : AbstractIntegrationsPatch(
|
||||
"$MUSIC_INTEGRATIONS_PATH/utils/ReVancedUtils;",
|
||||
listOf(InitFingerprint),
|
||||
)
|
@ -7,7 +7,6 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.shared.fingerprints.litho.IdentifierFingerprint
|
||||
import app.revanced.patches.shared.patch.litho.ComponentParserPatch
|
||||
import app.revanced.patches.shared.patch.litho.ComponentParserPatch.Companion.identifierHook
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
@ -15,11 +14,9 @@ import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
@DependsOn([ComponentParserPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MusicLithoFilterPatch : BytecodePatch(
|
||||
listOf(IdentifierFingerprint)
|
||||
) {
|
||||
class LithoFilterPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
identifierHook("$MUSIC_ADS_PATH/MusicLithoFilterPatch;->filter")
|
||||
identifierHook("$MUSIC_ADS_PATH/LithoFilterPatch;->filter")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
@ -17,7 +17,7 @@ import app.revanced.patches.music.utils.microg.bytecode.fingerprints.CastDynamit
|
||||
import app.revanced.patches.music.utils.microg.bytecode.fingerprints.GooglePlayUtilityFingerprint
|
||||
import app.revanced.patches.music.utils.microg.bytecode.fingerprints.PrimeFingerprint
|
||||
import app.revanced.patches.music.utils.microg.bytecode.fingerprints.ServiceCheckFingerprint
|
||||
import app.revanced.patches.music.utils.microg.resource.patch.MusicMicroGResourcePatch
|
||||
import app.revanced.patches.music.utils.microg.resource.patch.MicroGResourcePatch
|
||||
import app.revanced.patches.music.utils.microg.shared.Constants.MUSIC_PACKAGE_NAME
|
||||
import app.revanced.patches.music.utils.microg.shared.Constants.YOUTUBE_PACKAGE_NAME
|
||||
import app.revanced.patches.shared.patch.packagename.PackageNamePatch
|
||||
@ -27,15 +27,15 @@ import app.revanced.util.microg.MicroGBytecodeHelper
|
||||
@DependsOn(
|
||||
[
|
||||
ClientSpoofMusicPatch::class,
|
||||
MusicMicroGResourcePatch::class,
|
||||
MicroGResourcePatch::class,
|
||||
PackageNamePatch::class
|
||||
]
|
||||
)
|
||||
@Name("music-microg-support")
|
||||
@Name("microg-support")
|
||||
@Description("Allows ReVanced Music to run without root and under a different package name with MicroG.")
|
||||
@MusicCompatibility
|
||||
@Version("0.0.2")
|
||||
class MusicMicroGBytecodePatch : BytecodePatch(
|
||||
class MicroGPatch : BytecodePatch(
|
||||
listOf(
|
||||
ServiceCheckFingerprint,
|
||||
GooglePlayUtilityFingerprint,
|
@ -17,12 +17,12 @@ import app.revanced.util.microg.MicroGManifestHelper.addSpoofingMetadata
|
||||
import app.revanced.util.microg.MicroGResourceHelper.patchManifest
|
||||
import app.revanced.util.resources.MusicResourceHelper.setMicroG
|
||||
|
||||
@Name("music-microg-resource-patch")
|
||||
@Name("microg-resource-patch")
|
||||
@Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.")
|
||||
@DependsOn([PackageNamePatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.2")
|
||||
class MusicMicroGResourcePatch : ResourcePatch {
|
||||
class MicroGResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
val packageNameMusic = PackageNamePatch.MusicPackageName!!
|
||||
|
@ -11,18 +11,18 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.integrations.patch.MusicIntegrationsPatch
|
||||
import app.revanced.patches.music.utils.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.music.utils.settings.bytecode.fingerprints.PreferenceFingerprint
|
||||
import app.revanced.patches.music.utils.settings.bytecode.fingerprints.SettingsHeadersFragmentFingerprint
|
||||
import app.revanced.util.integrations.Constants.MUSIC_INTEGRATIONS_PATH
|
||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Name("music-settings-bytecode-patch")
|
||||
@DependsOn([MusicIntegrationsPatch::class])
|
||||
@Name("settings-bytecode-patch")
|
||||
@DependsOn([IntegrationsPatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MusicSettingsBytecodePatch : BytecodePatch(
|
||||
class SettingsBytecodePatch : BytecodePatch(
|
||||
listOf(
|
||||
PreferenceFingerprint,
|
||||
SettingsHeadersFragmentFingerprint
|
@ -9,7 +9,7 @@ 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.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.bytecode.patch.MusicSettingsBytecodePatch
|
||||
import app.revanced.patches.music.utils.settings.bytecode.patch.SettingsBytecodePatch
|
||||
import app.revanced.patches.shared.patch.settings.AbstractSettingsResourcePatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.resources.IconHelper
|
||||
@ -26,12 +26,12 @@ import java.io.File
|
||||
import java.nio.file.Paths
|
||||
|
||||
@Patch
|
||||
@Name("music-settings")
|
||||
@Name("settings")
|
||||
@Description("Adds settings for ReVanced to YouTube Music.")
|
||||
@DependsOn([MusicSettingsBytecodePatch::class])
|
||||
@DependsOn([SettingsBytecodePatch::class])
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MusicSettingsPatch : AbstractSettingsResourcePatch(
|
||||
class SettingsPatch : AbstractSettingsResourcePatch(
|
||||
"music/settings",
|
||||
"music/settings/host",
|
||||
false
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.music.utils.videoid.fingerprint
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object MusicVideoIdFingerprint : MethodFingerprint(
|
||||
object VideoIdFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
parameters = listOf("L"),
|
||||
opcodes = listOf(
|
@ -12,27 +12,27 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.videoid.fingerprint.MusicVideoIdFingerprint
|
||||
import app.revanced.patches.music.utils.videoid.fingerprint.VideoIdFingerprint
|
||||
import app.revanced.util.integrations.Constants.MUSIC_UTILS_PATH
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Name("music-video-id-hook")
|
||||
@Name("video-id-hook")
|
||||
@Description("Hook to detect when the video id changes.")
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MusicVideoIdPatch : BytecodePatch(
|
||||
listOf(MusicVideoIdFingerprint)
|
||||
class VideoIdPatch : BytecodePatch(
|
||||
listOf(VideoIdFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
MusicVideoIdFingerprint.result?.let {
|
||||
VideoIdFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
insertIndex = it.scanResult.patternScanResult!!.endIndex
|
||||
insertMethod = this
|
||||
videoIdRegister = getInstruction<OneRegisterInstruction>(insertIndex).registerA
|
||||
}
|
||||
offset++ // offset so setVideoId is called before any injected call
|
||||
} ?: return MusicVideoIdFingerprint.toErrorResult()
|
||||
} ?: return VideoIdFingerprint.toErrorResult()
|
||||
|
||||
injectCall("$INTEGRATIONS_CLASS_DESCRIPTOR->setVideoId(Ljava/lang/String;)V")
|
||||
|
Loading…
x
Reference in New Issue
Block a user