Compare commits

...

4 Commits

Author SHA1 Message Date
semantic-release-bot
cf8e8a44e4 chore(release): 2.193.0-dev.7 [skip ci]
# [2.193.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.6...v2.193.0-dev.7) (2023-10-08)

### Features

* **YouTube:** Bump compatibility to `18.38.44` ([#3071](https://github.com/ReVanced/revanced-patches/issues/3071)) ([42aea0c](42aea0c9ca))
2023-10-08 01:40:43 +00:00
LisoUseInAIKyrios
42aea0c9ca feat(YouTube): Bump compatibility to 18.38.44 (#3071) 2023-10-08 03:37:42 +02:00
semantic-release-bot
d735520421 chore(release): 2.193.0-dev.6 [skip ci]
# [2.193.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.5...v2.193.0-dev.6) (2023-10-08)

### Bug Fixes

* **YouTube:** Sort settings alphabetically despite punctuation ([#3097](https://github.com/ReVanced/revanced-patches/issues/3097)) ([debb07a](debb07ae21))
2023-10-08 01:29:00 +00:00
LisoUseInAIKyrios
debb07ae21 fix(YouTube): Sort settings alphabetically despite punctuation (#3097)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-10-08 03:25:27 +02:00
57 changed files with 137 additions and 63 deletions

View File

@@ -1,3 +1,17 @@
# [2.193.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.6...v2.193.0-dev.7) (2023-10-08)
### Features
* **YouTube:** Bump compatibility to `18.38.44` ([#3071](https://github.com/ReVanced/revanced-patches/issues/3071)) ([a73868c](https://github.com/ReVanced/revanced-patches/commit/a73868cb270295c871a9f1e4d543f728d6152146))
# [2.193.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.5...v2.193.0-dev.6) (2023-10-08)
### Bug Fixes
* **YouTube:** Sort settings alphabetically despite punctuation ([#3097](https://github.com/ReVanced/revanced-patches/issues/3097)) ([46e3c97](https://github.com/ReVanced/revanced-patches/commit/46e3c97d24e282e4d7d444603af4fb475ae03315))
# [2.193.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.193.0-dev.4...v2.193.0-dev.5) (2023-10-08)

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 2.193.0-dev.5
version = 2.193.0-dev.7

File diff suppressed because one or more lines are too long

View File

@@ -41,3 +41,8 @@ internal fun <T> Element.addDefault(default: T) {
)
}
}
internal fun CharSequence.removePunctuation(): String {
val punctuation = "\\p{P}+".toRegex()
return this.replace(punctuation, "")
}

View File

@@ -4,6 +4,7 @@ import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.preference.impl.PreferenceCategory
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.removePunctuation
import java.io.Closeable
abstract class AbstractPreferenceScreen(
@@ -35,8 +36,8 @@ abstract class AbstractPreferenceScreen(
return PreferenceScreen(
key,
StringResource("${key}_title", title),
preferences.sortedBy { it.title.value.lowercase() } +
categories.sortedBy { it.title.lowercase() }.map { it.transform() },
preferences.sortedBy { it.title.value.removePunctuation().lowercase() } +
categories.sortedBy { it.title.removePunctuation().lowercase() }.map { it.transform() },
summary?.let { summary ->
StringResource("${key}_summary", summary)
}
@@ -63,7 +64,7 @@ abstract class AbstractPreferenceScreen(
return PreferenceCategory(
key,
StringResource("${key}_title", title),
preferences.sortedBy { it.title.value.lowercase() }
preferences.sortedBy { it.title.value.removePunctuation().lowercase() }
)
}

View File

@@ -32,7 +32,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -26,7 +26,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -30,7 +30,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
),
]

View File

@@ -23,7 +23,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
"com.google.android.youtube",
[
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -32,7 +32,8 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -30,7 +30,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
],

View File

@@ -28,7 +28,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.Opcode
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -27,7 +27,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -24,7 +24,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
CompatiblePackage(
"com.google.android.youtube", [
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]
@@ -53,14 +54,14 @@ object HideLayoutComponentsPatch : BytecodePatch(
),
SwitchPreference(
"revanced_hide_join_membership_button",
StringResource("revanced_hide_join_membership_button_title", "Hide \"Join\" button"),
StringResource("revanced_hide_join_membership_button_title", "Hide \\\'Join\\\' button"),
StringResource("revanced_hide_join_membership_button_summary_on", "Button is hidden"),
StringResource("revanced_hide_join_membership_button_summary_off", "Button is shown")
),
SwitchPreference(
"revanced_hide_notify_me_button",
StringResource("revanced_hide_notify_me_button_title", "Hide \"Notify me\" button"),
StringResource("revanced_hide_notify_me_button_title", "Hide \\\'Notify me\\\' button"),
StringResource("revanced_hide_notify_me_button_summary_on", "Button is hidden"),
StringResource("revanced_hide_notify_me_button_summary_off", "Button is shown")
),

View File

@@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -11,7 +11,7 @@ import app.revanced.patches.youtube.layout.hide.loadmorebutton.fingerprints.Hide
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Patch(
name = "Hide \"Load more\" button",
name = "Hide \'Load more\' button",
description = "Hides the button under videos that loads similar videos.",
dependencies = [HideLoadMoreButtonResourcePatch::class],
compatiblePackages = [
@@ -24,7 +24,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -21,7 +21,7 @@ object HideLoadMoreButtonResourcePatch : ResourcePatch() {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_hide_load_more_button",
StringResource("revanced_hide_load_more_button_title", "Hide \"Load More\" button"),
StringResource("revanced_hide_load_more_button_title", "Hide \\\'Load More\\\' button"),
StringResource("revanced_hide_load_more_button_summary_on", "Button is hidden"),
StringResource("revanced_hide_load_more_button_summary_off", "Button is shown")
)

View File

@@ -24,7 +24,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
])
]
)

View File

@@ -33,7 +33,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]
@@ -122,7 +123,7 @@ object HideShortsComponentsPatch : BytecodePatch(
// Required to prevent a black bar from appearing at the bottom of the screen.
BottomNavigationBarFingerprint.result?.let {
it.mutableMethod.apply {
val moveResultIndex = it.scanResult.patternScanResult!!.startIndex
val moveResultIndex = it.scanResult.patternScanResult!!.startIndex + 2
val viewRegister = getInstruction<OneRegisterInstruction>(moveResultIndex).registerA
val insertIndex = moveResultIndex + 1

View File

@@ -1,18 +1,24 @@
package app.revanced.patches.youtube.layout.hide.shorts.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
object BottomNavigationBarFingerprint : MethodFingerprint(
returnType = "V",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf("Landroid/view/View;", "Landroid/os/Bundle;"),
opcodes = listOf(
Opcode.MOVE_RESULT_OBJECT, // Refers to bottom navigation bar
Opcode.CONST, // R.id.app_engagement_panel_wrapper
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IF_EQZ,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
),
strings = listOf(
"navigation_endpoint_interaction_logging_extension",
"reel_watch_fragment_watch_while",
"ReelWatchPaneFragmentViewModelKey"
),
)

View File

@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -25,7 +25,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -19,7 +19,8 @@ import org.w3c.dom.Element
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
],

View File

@@ -33,7 +33,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
PlayerTypeHookPatch::class,
],
compatiblePackages = [
CompatiblePackage("com.google.android.youtube", ["18.37.36"])
CompatiblePackage("com.google.android.youtube", ["18.37.36", "18.38.44"])
]
)
@Suppress("unused")

View File

@@ -28,7 +28,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -45,7 +45,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
],

View File

@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -24,7 +24,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -34,7 +34,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
)
)
]

View File

@@ -26,7 +26,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -30,7 +30,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -25,7 +25,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import app.revanced.util.microg.MicroGBytecodeHelper
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -35,7 +35,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -58,7 +58,7 @@ object PlayerControlsBytecodePatch : BytecodePatch(
* @param descriptor The descriptor of the method which should be calleed.
*/
fun initializeControl(descriptor: String) {
inflateFingerprintResult!!.mutableMethod.addInstruction(
inflateFingerprintResult.mutableMethod.addInstruction(
moveToRegisterInstructionIndex + 1,
"invoke-static {v$viewRegister}, $descriptor"
)

View File

@@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -19,7 +19,8 @@ import app.revanced.patches.youtube.video.speed.remember.RememberPlaybackSpeedPa
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]

View File

@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36"
"18.37.36",
"18.38.44"
]
)
]