mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 13:17:46 +02:00
fix: patch fails when custom-video-speed
patch is excluded
This commit is contained in:
@ -48,6 +48,8 @@ class CustomVideoSpeedPatch : ResourcePatch {
|
||||
ResourceHelper.addEntries(context, speedElements[index] + "x")
|
||||
}
|
||||
|
||||
ResourceHelper.addSpeed(context)
|
||||
|
||||
/*
|
||||
add settings
|
||||
*/
|
||||
|
@ -58,6 +58,19 @@ internal object ResourceHelper {
|
||||
)
|
||||
}
|
||||
|
||||
fun addSpeed(
|
||||
context: ResourceContext
|
||||
) {
|
||||
val prefs = context["res/xml/revanced_prefs.xml"]
|
||||
prefs.writeText(
|
||||
prefs.readText()
|
||||
.replace(
|
||||
"revanced_default_video_speed\"",
|
||||
"revanced_default_video_speed\" android:entries=\"@array/revanced_video_speed_entries\" android:entryValues=\"@array/revanced_video_speed_entry_values\""
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
fun addSettings(
|
||||
context: ResourceContext,
|
||||
PreferenceCategory: String,
|
||||
|
Reference in New Issue
Block a user