mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 05:37:40 +02:00
chore: lint code
This commit is contained in:
@ -21,7 +21,7 @@ import app.revanced.util.integrations.Constants.MUSIC_COMPONENTS_PATH
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object MusicAdsPatch : AbstractAdsPatch(
|
object MusicAdsPatch : AbstractAdsPatch(
|
||||||
"$MUSIC_ADS_PATH/HideMusicAdsPatch;->hideMusicAds()Z"
|
"$MUSIC_ADS_PATH/MusicAdsPatch;->hideMusicAds()Z"
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
super.execute(context)
|
super.execute(context)
|
||||||
|
@ -41,7 +41,7 @@ import app.revanced.util.integrations.Constants.ADS_PATH
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object VideoAdsPatch : AbstractAdsPatch(
|
object VideoAdsPatch : AbstractAdsPatch(
|
||||||
"$ADS_PATH/HideVideoAdsPatch;->hideVideoAds()Z"
|
"$ADS_PATH/VideoAdsPatch;->hideVideoAds()Z"
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
super.execute(context)
|
super.execute(context)
|
||||||
|
@ -17,14 +17,13 @@ object VideoIdWithoutShortsPatch : BytecodePatch(
|
|||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
|
||||||
VideoIdWithoutShortsFingerprint.result?.let {
|
VideoIdWithoutShortsFingerprint.result?.let {
|
||||||
insertMethod = it.mutableMethod
|
it.mutableMethod.apply {
|
||||||
|
insertMethod = this
|
||||||
insertIndex = insertMethod.implementation!!.instructions.indexOfFirst { instruction ->
|
insertIndex = implementation!!.instructions.indexOfFirst { instruction ->
|
||||||
instruction.opcode == Opcode.INVOKE_INTERFACE
|
instruction.opcode == Opcode.INVOKE_INTERFACE
|
||||||
|
}
|
||||||
|
insertRegister = getInstruction<OneRegisterInstruction>(insertIndex + 1).registerA
|
||||||
}
|
}
|
||||||
|
|
||||||
insertRegister =
|
|
||||||
insertMethod.getInstruction<OneRegisterInstruction>(insertIndex + 1).registerA
|
|
||||||
} ?: throw VideoIdWithoutShortsFingerprint.exception
|
} ?: throw VideoIdWithoutShortsFingerprint.exception
|
||||||
|
|
||||||
injectCall("$VIDEO_PATH/VideoInformation;->setVideoId(Ljava/lang/String;)V")
|
injectCall("$VIDEO_PATH/VideoInformation;->setVideoId(Ljava/lang/String;)V")
|
||||||
|
Reference in New Issue
Block a user