mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 05:37:40 +02:00
feat(music): add custom-playback-speed
patch
This commit is contained in:
@ -0,0 +1,33 @@
|
||||
package app.revanced.patches.music.video.customspeed.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
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.intenthook.patch.IntentHookPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.patch.customspeed.AbstractCustomPlaybackSpeedPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_VIDEO_PATH
|
||||
|
||||
@Patch
|
||||
@Name("Custom playback speed")
|
||||
@Description("Adds more playback speed options.")
|
||||
@DependsOn([IntentHookPatch::class])
|
||||
@MusicCompatibility
|
||||
class CustomPlaybackSpeedPatch : AbstractCustomPlaybackSpeedPatch(
|
||||
"$MUSIC_VIDEO_PATH/CustomPlaybackSpeedPatch;",
|
||||
3.0f
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
super.execute(context)
|
||||
|
||||
SettingsPatch.addMusicPreferenceWithIntent(
|
||||
CategoryType.VIDEO,
|
||||
"revanced_custom_playback_speeds"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -12,6 +12,10 @@
|
||||
<string name="revanced_custom_filter_strings_title">Edit custom filter</string>
|
||||
<string name="revanced_custom_filter_summary">Enables custom filter to hide layout components.</string>
|
||||
<string name="revanced_custom_filter_title">Enable custom filter</string>
|
||||
<string name="revanced_custom_playback_speeds_invalid">Invalid custom playback speeds! Reset to default values.</string>
|
||||
<string name="revanced_custom_playback_speeds_warning" formatted="false">Custom speeds must be less than %sx</string>
|
||||
<string name="revanced_custom_playback_speeds_summary">Add or change the playback speeds available</string>
|
||||
<string name="revanced_custom_playback_speeds_title">Edit custom playback speeds</string>
|
||||
<string name="revanced_disable_auto_captions_summary">Disables forced auto captions.</string>
|
||||
<string name="revanced_disable_auto_captions_title">Disable forced auto captions</string>
|
||||
<string name="revanced_downloader_not_installed" formatted="false">%s is not installed. Please install it.</string>
|
||||
|
Reference in New Issue
Block a user