mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-09 11:04:36 +02:00
feat(YouTube Music): change the description of the Enable color match player
, Enable zen mode
patches and exclude them by default
This commit is contained in:
parent
d9042ba18c
commit
70711751ed
@ -5,6 +5,7 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWith
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
@ -24,7 +25,7 @@ import kotlin.properties.Delegates
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Enable color match player",
|
name = "Enable color match player",
|
||||||
description = "Adds an option to match the color of the miniplayer to the fullscreen player.",
|
description = "Adds an option to match the color of the miniplayer to the fullscreen player. Deprecated on YT Music 6.34.51+.",
|
||||||
dependencies = [SettingsPatch::class],
|
dependencies = [SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@ -42,7 +43,8 @@ import kotlin.properties.Delegates
|
|||||||
"6.33.52"
|
"6.33.52"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
],
|
||||||
|
use = false
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object ColorMatchPlayerPatch : BytecodePatch(
|
object ColorMatchPlayerPatch : BytecodePatch(
|
||||||
@ -163,7 +165,7 @@ object ColorMatchPlayerPatch : BytecodePatch(
|
|||||||
removeInstruction(insertIndex - 1)
|
removeInstruction(insertIndex - 1)
|
||||||
}
|
}
|
||||||
} ?: throw NewPlayerColorFingerprint.exception
|
} ?: throw NewPlayerColorFingerprint.exception
|
||||||
} ?: throw PlayerColorFingerprint.exception
|
} ?: throw PatchException("This version is not supported. Please use YT Music 6.33.52 or earlier.")
|
||||||
|
|
||||||
SettingsPatch.addMusicPreference(
|
SettingsPatch.addMusicPreference(
|
||||||
CategoryType.PLAYER,
|
CategoryType.PLAYER,
|
||||||
|
@ -5,6 +5,7 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWith
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.player.zenmode.fingerprints.ZenModeFingerprint
|
import app.revanced.patches.music.player.zenmode.fingerprints.ZenModeFingerprint
|
||||||
@ -18,7 +19,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Enable zen mode",
|
name = "Enable zen mode",
|
||||||
description = "Adds an option to change the player background to light grey to reduce eye strain.",
|
description = "Adds an option to change the player background to light grey to reduce eye strain. Deprecated on YT Music 6.34.51+.",
|
||||||
dependencies = [SettingsPatch::class],
|
dependencies = [SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@ -36,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|||||||
"6.33.52"
|
"6.33.52"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
],
|
||||||
|
use = false
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object ZenModePatch : BytecodePatch(
|
object ZenModePatch : BytecodePatch(
|
||||||
@ -76,7 +78,7 @@ object ZenModePatch : BytecodePatch(
|
|||||||
removeInstruction(replaceReferenceIndex)
|
removeInstruction(replaceReferenceIndex)
|
||||||
}
|
}
|
||||||
} ?: throw ZenModeFingerprint.exception
|
} ?: throw ZenModeFingerprint.exception
|
||||||
} ?: throw PlayerColorFingerprint.exception
|
} ?: throw PatchException("This version is not supported. Please use YT Music 6.33.52 or earlier.")
|
||||||
|
|
||||||
SettingsPatch.addMusicPreference(
|
SettingsPatch.addMusicPreference(
|
||||||
CategoryType.PLAYER,
|
CategoryType.PLAYER,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user