fix(YouTube - Playback speed): Add 'Auto' speed. Always override speed if default is set to 1.0x (#3914)

This commit is contained in:
LisoUseInAIKyrios
2024-11-15 07:56:36 +04:00
committed by GitHub
parent e435a9e250
commit 497739e8ce
5 changed files with 25 additions and 15 deletions

View File

@ -61,10 +61,10 @@ internal val rememberPlaybackSpeedPatch = bytecodePatch {
invoke-static { }, $EXTENSION_CLASS_DESCRIPTOR->getPlaybackSpeedOverride()F
move-result v0
# Check if the playback speed is not 1.0x.
const/high16 v1, 1.0f
# Check if the playback speed is not auto (-2.0f)
const/4 v1, 0x0
cmpg-float v1, v0, v1
if-eqz v1, :do_not_override
if-lez v1, :do_not_override
# Get the instance of the class which has the container class field below.
iget-object v1, p0, $onItemClickListenerClassFieldReference

View File

@ -1189,6 +1189,7 @@ This is because Crowdin requires temporarily flattening this file and removing t
<string name="revanced_custom_playback_speeds_summary">Add or change the custom playback speeds</string>
<string name="revanced_custom_playback_speeds_invalid">Custom speeds must be less than %s. Using default values.</string>
<string name="revanced_custom_playback_speeds_parse_exception">Invalid custom playback speeds. Using default values.</string>
<string name="revanced_custom_playback_speeds_auto">Auto</string>
</patch>
<patch id="video.speed.remember.rememberPlaybackSpeedPatch">
<string name="revanced_remember_playback_speed_last_selected_title">Remember playback speed changes</string>