Skip to content

Commit

Permalink
feat: remove decoding-patch that are no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
inotia00 committed Sep 5, 2023
1 parent e619c4b commit c00af81
Show file tree
Hide file tree
Showing 16 changed files with 3 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.ResourceContext
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.fix.decoding.patch.DecodingPatch
import org.w3c.dom.Element

@Patch
@Name("Amoled")
@Description("Applies pure black theme in flyout panels.")
@DependsOn([DecodingPatch::class])
@MusicCompatibility
class AmoledPatch : ResourcePatch {
override fun execute(context: ResourceContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.ResourceContext
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.fix.decoding.patch.DecodingPatch
import app.revanced.util.resources.IconHelper.customIconMusic
import app.revanced.util.resources.IconHelper.customIconMusicAdditional

@Patch(false)
@Name("Custom branding icon MMT")
@Description("Changes the YouTube Music launcher icon to MMT.")
@DependsOn([DecodingPatch::class])
@MusicCompatibility
class CustomBrandingIconMMTPatch : ResourcePatch {
override fun execute(context: ResourceContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.ResourceContext
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.fix.decoding.patch.DecodingPatch
import app.revanced.util.resources.IconHelper.customIconMusic

@Patch
@Name("Custom branding icon Revancify blue")
@Description("Changes the YouTube Music launcher icon to Revancify Blue.")
@DependsOn([DecodingPatch::class])
@MusicCompatibility
class CustomBrandingIconRevancifyBluePatch : ResourcePatch {
override fun execute(context: ResourceContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.ResourceContext
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.fix.decoding.patch.DecodingPatch
import app.revanced.util.resources.IconHelper.customIconMusic

@Patch(false)
@Name("Custom branding icon Revancify red")
@Description("Changes the YouTube Music launcher icon to Revancify Red.")
@DependsOn([DecodingPatch::class])
@MusicCompatibility
class CustomBrandingIconRevancifyRedPatch : ResourcePatch {
override fun execute(context: ResourceContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@ 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.fix.decoding.patch.DecodingPatch

@Patch
@Name("Custom branding Music name")
@Description("Rename the YouTube Music app to the name specified in options.json.")
@DependsOn(
[
DecodingPatch::class,
RemoveElementsPatch::class
]
)
@DependsOn([RemoveElementsPatch::class])
@MusicCompatibility
class CustomBrandingNamePatch : ResourcePatch {
override fun execute(context: ResourceContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.music.misc.backgroundplay.fingerprints.BackgroundPlaybackParentFingerprint
import app.revanced.patches.music.utils.annotations.MusicCompatibility
import app.revanced.patches.music.utils.fix.decoding.patch.DecodingPatch

@Patch
@Name("Background play")
@Description("Enables playing music in the background.")
@DependsOn([DecodingPatch::class])
@MusicCompatibility
class BackgroundPlayPatch : BytecodePatch(
listOf(BackgroundPlaybackParentFingerprint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.ResourceContext
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.fix.decoding.patch.DecodingPatch

@Patch
@Name("Bitrate default value")
@Description("Set the audio quality to \"Always High\" when you first install the app.")
@DependsOn([DecodingPatch::class])
@MusicCompatibility
class BitrateDefaultValuePatch : ResourcePatch {
override fun execute(context: ResourceContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.misc.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
import app.revanced.patches.music.utils.annotations.MusicCompatibility
import app.revanced.patches.music.utils.fix.decoding.patch.DecodingPatch

@Patch
@Name("Exclusive audio playback")
@Description("Enables the option to play music without video.")
@DependsOn([DecodingPatch::class])
@MusicCompatibility
class ExclusiveAudioPatch : BytecodePatch(
listOf(AudioOnlyEnablerFingerprint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.ResourceContext
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.fix.decoding.patch.DecodingPatch
import java.nio.file.Files
import java.nio.file.StandardCopyOption

@Patch
@Name("Optimize resource")
@Description("Remove unnecessary resources.")
@DependsOn([DecodingPatch::class])
@MusicCompatibility
class OptimizeResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.music.misc.premium.fingerprints.AccountMenuFooterFingerprint
import app.revanced.patches.music.misc.premium.fingerprints.HideGetPremiumFingerprint
import app.revanced.patches.music.utils.annotations.MusicCompatibility
import app.revanced.patches.music.utils.fix.decoding.patch.DecodingPatch
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.PrivacyTosFooter
import app.revanced.util.bytecode.getWideLiteralIndex
Expand All @@ -26,12 +25,7 @@ import com.android.tools.smali.dexlib2.iface.reference.Reference
@Patch
@Name("Hide get premium")
@Description("Hides \"Get Premium\" label from the account menu.")
@DependsOn(
[
DecodingPatch::class,
SharedResourceIdPatch::class
]
)
@DependsOn([SharedResourceIdPatch::class])
@MusicCompatibility
class HideGetPremiumPatch : BytecodePatch(
listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@ import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.misc.tastebuilder.fingerprints.TasteBuilderConstructorFingerprint
import app.revanced.patches.music.utils.annotations.MusicCompatibility
import app.revanced.patches.music.utils.fix.decoding.patch.DecodingPatch
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction

@Patch
@Name("Hide taste builder")
@Description("Hides the \"Tell us which artists you like\" card from homepage.")
@DependsOn([DecodingPatch::class])
@MusicCompatibility
class TasteBuilderPatch : BytecodePatch(
listOf(TasteBuilderConstructorFingerprint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.misc.upgradebutton.fingerprints.NotifierShelfFingerprint
import app.revanced.patches.music.misc.upgradebutton.fingerprints.PivotBarConstructorFingerprint
import app.revanced.patches.music.utils.annotations.MusicCompatibility
import app.revanced.patches.music.utils.fix.decoding.patch.DecodingPatch
import app.revanced.patches.music.utils.integrations.patch.IntegrationsPatch
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
Expand All @@ -26,7 +25,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
@Description("Hides upgrade button from navigation bar and hide upgrade banner from homepage.")
@DependsOn(
[
DecodingPatch::class,
IntegrationsPatch::class,
SharedResourceIdPatch::class
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
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.fix.androidauto.fingerprints.CertificateCheckFingerprint
import app.revanced.patches.music.utils.fix.decoding.patch.DecodingPatch

@Patch
@Name("Certificate spoof")
@Description("Spoofs the YouTube Music certificate for Android Auto.")
@DependsOn([DecodingPatch::class])
@MusicCompatibility
class AndroidAutoCertificatePatch : BytecodePatch(
listOf(CertificateCheckFingerprint)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ 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.fix.clientspoof.patch.ClientSpoofMusicPatch
import app.revanced.patches.music.utils.fix.decoding.patch.DecodingPatch
import app.revanced.patches.music.utils.microg.bytecode.fingerprints.CastContextFetchFingerprint
import app.revanced.patches.music.utils.microg.bytecode.fingerprints.CastDynamiteModuleFingerprint
import app.revanced.patches.music.utils.microg.bytecode.fingerprints.CastDynamiteModuleV2Fingerprint
Expand All @@ -26,7 +25,6 @@ import app.revanced.util.microg.MicroGBytecodeHelper
@DependsOn(
[
ClientSpoofMusicPatch::class,
DecodingPatch::class,
MicroGResourcePatch::class,
PackageNamePatch::class
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import app.revanced.patcher.data.ResourceContext
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.fix.decoding.patch.DecodingPatch
import app.revanced.patches.music.utils.settings.bytecode.patch.SettingsBytecodePatch
import app.revanced.patches.shared.patch.settings.AbstractSettingsResourcePatch
import app.revanced.util.enum.CategoryType
Expand All @@ -27,12 +26,7 @@ import java.nio.file.Paths
@Patch
@Name("Settings")
@Description("Adds settings for ReVanced to YouTube Music.")
@DependsOn(
[
DecodingPatch::class,
SettingsBytecodePatch::class
]
)
@DependsOn([SettingsBytecodePatch::class])
@MusicCompatibility
class SettingsPatch : AbstractSettingsResourcePatch(
"music/settings",
Expand Down

0 comments on commit c00af81

Please sign in to comment.