mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-20 09:33:57 +00:00
Compare commits
4 Commits
v5.0.3-dev
...
v5.0.3-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9efb05271 | ||
|
|
2e3b3dca4b | ||
|
|
19eaee09d0 | ||
|
|
78f3fd6aa4 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
## [5.0.3-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.0.3-dev.3...v5.0.3-dev.4) (2024-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Spoof app version:** Adjust legacy spoof targets ([#3934](https://github.com/ReVanced/revanced-patches/issues/3934)) ([f5794c1](https://github.com/ReVanced/revanced-patches/commit/f5794c1f896c331d76fdfc299e31a2773f2209ca))
|
||||||
|
|
||||||
|
## [5.0.3-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.0.3-dev.2...v5.0.3-dev.3) (2024-11-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Playback speed:** Add 'Auto' speed. Always override speed if default is set to 1.0x ([#3914](https://github.com/ReVanced/revanced-patches/issues/3914)) ([497739e](https://github.com/ReVanced/revanced-patches/commit/497739e8ce6933c1f1ea46edffc102e56b985623))
|
||||||
|
|
||||||
## [5.0.3-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.0.3-dev.1...v5.0.3-dev.2) (2024-11-15)
|
## [5.0.3-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.0.3-dev.1...v5.0.3-dev.2) (2024-11-15)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.revanced.extension.youtube.patches.playback.speed;
|
package app.revanced.extension.youtube.patches.playback.speed;
|
||||||
|
|
||||||
|
import static app.revanced.extension.shared.StringRef.sf;
|
||||||
import static app.revanced.extension.shared.StringRef.str;
|
import static app.revanced.extension.shared.StringRef.str;
|
||||||
|
|
||||||
import android.preference.ListPreference;
|
import android.preference.ListPreference;
|
||||||
@@ -10,15 +11,18 @@ import android.view.ViewParent;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import app.revanced.extension.youtube.patches.components.PlaybackSpeedMenuFilterPatch;
|
import java.util.Arrays;
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
|
import app.revanced.extension.youtube.patches.components.PlaybackSpeedMenuFilterPatch;
|
||||||
import java.util.Arrays;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class CustomPlaybackSpeedPatch {
|
public class CustomPlaybackSpeedPatch {
|
||||||
|
|
||||||
|
private static final float PLAYBACK_SPEED_AUTO = Settings.PLAYBACK_SPEED_DEFAULT.defaultValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum playback speed, exclusive value. Custom speeds must be less than this value.
|
* Maximum playback speed, exclusive value. Custom speeds must be less than this value.
|
||||||
*
|
*
|
||||||
@@ -26,7 +30,7 @@ public class CustomPlaybackSpeedPatch {
|
|||||||
* and the UI selector starts flickering and acting weird.
|
* and the UI selector starts flickering and acting weird.
|
||||||
* Over 10x and the speeds show up out of order in the UI selector.
|
* Over 10x and the speeds show up out of order in the UI selector.
|
||||||
*/
|
*/
|
||||||
public static final float MAXIMUM_PLAYBACK_SPEED = 8;
|
public static final float PLAYBACK_SPEED_MAXIMUM = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom playback speeds.
|
* Custom playback speeds.
|
||||||
@@ -69,8 +73,8 @@ public class CustomPlaybackSpeedPatch {
|
|||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (speedFloat >= MAXIMUM_PLAYBACK_SPEED) {
|
if (speedFloat >= PLAYBACK_SPEED_MAXIMUM) {
|
||||||
resetCustomSpeeds(str("revanced_custom_playback_speeds_invalid", MAXIMUM_PLAYBACK_SPEED));
|
resetCustomSpeeds(str("revanced_custom_playback_speeds_invalid", PLAYBACK_SPEED_MAXIMUM));
|
||||||
loadCustomSpeeds();
|
loadCustomSpeeds();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -98,10 +102,15 @@ public class CustomPlaybackSpeedPatch {
|
|||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public static void initializeListPreference(ListPreference preference) {
|
public static void initializeListPreference(ListPreference preference) {
|
||||||
if (preferenceListEntries == null) {
|
if (preferenceListEntries == null) {
|
||||||
preferenceListEntries = new String[customPlaybackSpeeds.length];
|
final int numberOfEntries = customPlaybackSpeeds.length + 1;
|
||||||
preferenceListEntryValues = new String[customPlaybackSpeeds.length];
|
preferenceListEntries = new String[numberOfEntries];
|
||||||
|
preferenceListEntryValues = new String[numberOfEntries];
|
||||||
|
|
||||||
int i = 0;
|
// Auto speed (same behavior as unpatched).
|
||||||
|
preferenceListEntries[0] = sf("revanced_custom_playback_speeds_auto").toString();
|
||||||
|
preferenceListEntryValues[0] = String.valueOf(PLAYBACK_SPEED_AUTO);
|
||||||
|
|
||||||
|
int i = 1;
|
||||||
for (float speed : customPlaybackSpeeds) {
|
for (float speed : customPlaybackSpeeds) {
|
||||||
String speedString = String.valueOf(speed);
|
String speedString = String.valueOf(speed);
|
||||||
preferenceListEntries[i] = speedString + "x";
|
preferenceListEntries[i] = speedString + "x";
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public final class RememberPlaybackSpeedPatch {
|
|||||||
// With the 0.05x menu, if the speed is set by integrations to higher than 2.0x
|
// With the 0.05x menu, if the speed is set by integrations to higher than 2.0x
|
||||||
// then the menu will allow increasing without bounds but the max speed is
|
// then the menu will allow increasing without bounds but the max speed is
|
||||||
// still capped to under 8.0x.
|
// still capped to under 8.0x.
|
||||||
playbackSpeed = Math.min(playbackSpeed, CustomPlaybackSpeedPatch.MAXIMUM_PLAYBACK_SPEED - 0.05f);
|
playbackSpeed = Math.min(playbackSpeed, CustomPlaybackSpeedPatch.PLAYBACK_SPEED_MAXIMUM - 0.05f);
|
||||||
|
|
||||||
// Prevent toast spamming if using the 0.05x adjustments.
|
// Prevent toast spamming if using the 0.05x adjustments.
|
||||||
// Show exactly one toast after the user stops interacting with the speed menu.
|
// Show exactly one toast after the user stops interacting with the speed menu.
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class Settings extends BaseSettings {
|
|||||||
// Speed
|
// Speed
|
||||||
public static final BooleanSetting REMEMBER_PLAYBACK_SPEED_LAST_SELECTED = new BooleanSetting("revanced_remember_playback_speed_last_selected", FALSE);
|
public static final BooleanSetting REMEMBER_PLAYBACK_SPEED_LAST_SELECTED = new BooleanSetting("revanced_remember_playback_speed_last_selected", FALSE);
|
||||||
public static final BooleanSetting CUSTOM_SPEED_MENU = new BooleanSetting("revanced_custom_speed_menu", TRUE);
|
public static final BooleanSetting CUSTOM_SPEED_MENU = new BooleanSetting("revanced_custom_speed_menu", TRUE);
|
||||||
public static final FloatSetting PLAYBACK_SPEED_DEFAULT = new FloatSetting("revanced_playback_speed_default", 1.0f);
|
public static final FloatSetting PLAYBACK_SPEED_DEFAULT = new FloatSetting("revanced_playback_speed_default", -2.0f);
|
||||||
public static final StringSetting CUSTOM_PLAYBACK_SPEEDS = new StringSetting("revanced_custom_playback_speeds",
|
public static final StringSetting CUSTOM_PLAYBACK_SPEEDS = new StringSetting("revanced_custom_playback_speeds",
|
||||||
"0.25\n0.5\n0.75\n0.9\n0.95\n1.0\n1.05\n1.1\n1.25\n1.5\n1.75\n2.0\n3.0\n4.0\n5.0", true);
|
"0.25\n0.5\n0.75\n0.9\n0.95\n1.0\n1.05\n1.1\n1.25\n1.5\n1.75\n2.0\n3.0\n4.0\n5.0", true);
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ public class Settings extends BaseSettings {
|
|||||||
// General layout
|
// General layout
|
||||||
public static final EnumSetting<StartPage> CHANGE_START_PAGE = new EnumSetting<>("revanced_change_start_page", StartPage.ORIGINAL, true);
|
public static final EnumSetting<StartPage> CHANGE_START_PAGE = new EnumSetting<>("revanced_change_start_page", StartPage.ORIGINAL, true);
|
||||||
public static final BooleanSetting SPOOF_APP_VERSION = new BooleanSetting("revanced_spoof_app_version", FALSE, true, "revanced_spoof_app_version_user_dialog_message");
|
public static final BooleanSetting SPOOF_APP_VERSION = new BooleanSetting("revanced_spoof_app_version", FALSE, true, "revanced_spoof_app_version_user_dialog_message");
|
||||||
public static final StringSetting SPOOF_APP_VERSION_TARGET = new StringSetting("revanced_spoof_app_version_target", IS_19_17_OR_GREATER ? "18.38.44" : "17.41.37", true, parent(SPOOF_APP_VERSION));
|
public static final StringSetting SPOOF_APP_VERSION_TARGET = new StringSetting("revanced_spoof_app_version_target", IS_19_17_OR_GREATER ? "18.38.44" : "17.33.42", true, parent(SPOOF_APP_VERSION));
|
||||||
public static final BooleanSetting TABLET_LAYOUT = new BooleanSetting("revanced_tablet_layout", FALSE, true, "revanced_tablet_layout_user_dialog_message");
|
public static final BooleanSetting TABLET_LAYOUT = new BooleanSetting("revanced_tablet_layout", FALSE, true, "revanced_tablet_layout_user_dialog_message");
|
||||||
public static final BooleanSetting WIDE_SEARCHBAR = new BooleanSetting("revanced_wide_searchbar", FALSE, true);
|
public static final BooleanSetting WIDE_SEARCHBAR = new BooleanSetting("revanced_wide_searchbar", FALSE, true);
|
||||||
public static final BooleanSetting BYPASS_IMAGE_REGION_RESTRICTIONS = new BooleanSetting("revanced_bypass_image_region_restrictions", FALSE, true);
|
public static final BooleanSetting BYPASS_IMAGE_REGION_RESTRICTIONS = new BooleanSetting("revanced_bypass_image_region_restrictions", FALSE, true);
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
android.useAndroidX = true
|
android.useAndroidX = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 5.0.3-dev.2
|
version = 5.0.3-dev.4
|
||||||
|
|||||||
@@ -61,10 +61,10 @@ internal val rememberPlaybackSpeedPatch = bytecodePatch {
|
|||||||
invoke-static { }, $EXTENSION_CLASS_DESCRIPTOR->getPlaybackSpeedOverride()F
|
invoke-static { }, $EXTENSION_CLASS_DESCRIPTOR->getPlaybackSpeedOverride()F
|
||||||
move-result v0
|
move-result v0
|
||||||
|
|
||||||
# Check if the playback speed is not 1.0x.
|
# Check if the playback speed is not auto (-2.0f)
|
||||||
const/high16 v1, 1.0f
|
const/4 v1, 0x0
|
||||||
cmpg-float v1, v0, v1
|
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.
|
# Get the instance of the class which has the container class field below.
|
||||||
iget-object v1, p0, $onItemClickListenerClassFieldReference
|
iget-object v1, p0, $onItemClickListenerClassFieldReference
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<item>18.33.40</item>
|
<item>18.33.40</item>
|
||||||
<item>18.20.39</item>
|
<item>18.20.39</item>
|
||||||
<item>18.09.39</item>
|
<item>18.09.39</item>
|
||||||
<item>17.41.37</item>
|
<item>17.33.42</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
</patch>
|
</patch>
|
||||||
<patch id="layout.miniplayer.miniplayerPatch">
|
<patch id="layout.miniplayer.miniplayerPatch">
|
||||||
|
|||||||
@@ -978,7 +978,7 @@ This is because Crowdin requires temporarily flattening this file and removing t
|
|||||||
<string name="revanced_spoof_app_version_target_legacy_entry_1">18.33.40 - Restore RYD on Shorts incognito mode</string>
|
<string name="revanced_spoof_app_version_target_legacy_entry_1">18.33.40 - Restore RYD on Shorts incognito mode</string>
|
||||||
<string name="revanced_spoof_app_version_target_legacy_entry_2">18.20.39 - Restore wide video speed & quality menu</string>
|
<string name="revanced_spoof_app_version_target_legacy_entry_2">18.20.39 - Restore wide video speed & quality menu</string>
|
||||||
<string name="revanced_spoof_app_version_target_legacy_entry_3">18.09.39 - Restore library tab</string>
|
<string name="revanced_spoof_app_version_target_legacy_entry_3">18.09.39 - Restore library tab</string>
|
||||||
<string name="revanced_spoof_app_version_target_legacy_entry_4">17.41.37 - Restore old playlist shelf</string>
|
<string name="revanced_spoof_app_version_target_legacy_entry_4">17.33.42 - Restore old playlist shelf</string>
|
||||||
</patch>
|
</patch>
|
||||||
<patch id="layout.startpage.changeStartPagePatch">
|
<patch id="layout.startpage.changeStartPagePatch">
|
||||||
<string name="revanced_change_start_page_title">Set start page</string>
|
<string name="revanced_change_start_page_title">Set start page</string>
|
||||||
@@ -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_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_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_parse_exception">Invalid custom playback speeds. Using default values.</string>
|
||||||
|
<string name="revanced_custom_playback_speeds_auto">Auto</string>
|
||||||
</patch>
|
</patch>
|
||||||
<patch id="video.speed.remember.rememberPlaybackSpeedPatch">
|
<patch id="video.speed.remember.rememberPlaybackSpeedPatch">
|
||||||
<string name="revanced_remember_playback_speed_last_selected_title">Remember playback speed changes</string>
|
<string name="revanced_remember_playback_speed_last_selected_title">Remember playback speed changes</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user