|
9 | 9 | import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType;
|
10 | 10 | import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType.*;
|
11 | 11 | import static app.revanced.extension.youtube.patches.SeekbarThumbnailsPatch.SeekbarThumbnailsHighQualityAvailability;
|
| 12 | +import static app.revanced.extension.youtube.patches.VersionCheckPatch.IS_19_17_OR_GREATER; |
12 | 13 | import static app.revanced.extension.youtube.sponsorblock.objects.CategoryBehaviour.*;
|
13 | 14 |
|
14 | 15 | import app.revanced.extension.shared.Logger;
|
|
23 | 24 | import app.revanced.extension.youtube.patches.spoof.SpoofVideoStreamsPatch;
|
24 | 25 | import app.revanced.extension.youtube.sponsorblock.SponsorBlockSettings;
|
25 | 26 |
|
26 |
| -@SuppressWarnings("deprecation") |
27 | 27 | public class Settings extends BaseSettings {
|
28 | 28 | // Video
|
29 | 29 | public static final BooleanSetting RESTORE_OLD_VIDEO_QUALITY_MENU = new BooleanSetting("revanced_restore_old_video_quality_menu", TRUE);
|
@@ -128,8 +128,7 @@ public class Settings extends BaseSettings {
|
128 | 128 | public static final BooleanSetting HIDE_AUTOPLAY_BUTTON = new BooleanSetting("revanced_hide_autoplay_button", TRUE, true);
|
129 | 129 | public static final BooleanSetting HIDE_CAST_BUTTON = new BooleanSetting("revanced_hide_cast_button", TRUE, true);
|
130 | 130 | public static final BooleanSetting HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS = new BooleanSetting("revanced_hide_player_previous_next_buttons", FALSE, true);
|
131 |
| - @Deprecated |
132 |
| - public static final BooleanSetting HIDE_PLAYER_BUTTONS = new BooleanSetting("revanced_hide_player_buttons", FALSE, true); |
| 131 | + private static final BooleanSetting DEPRECATED_HIDE_PLAYER_BUTTONS = new BooleanSetting("revanced_hide_player_buttons", FALSE, true); |
133 | 132 | public static final BooleanSetting COPY_VIDEO_URL = new BooleanSetting("revanced_copy_video_url", FALSE);
|
134 | 133 | public static final BooleanSetting COPY_VIDEO_URL_TIMESTAMP = new BooleanSetting("revanced_copy_video_url_timestamp", TRUE);
|
135 | 134 | public static final BooleanSetting PLAYBACK_SPEED_DIALOG_BUTTON = new BooleanSetting("revanced_playback_speed_dialog_button", FALSE);
|
@@ -192,14 +191,13 @@ public class Settings extends BaseSettings {
|
192 | 191 | public static final BooleanSetting HIDE_PLAYER_FLYOUT_SLEEP_TIMER = new BooleanSetting("revanced_hide_player_flyout_sleep_timer", FALSE);
|
193 | 192 | public static final BooleanSetting HIDE_PLAYER_FLYOUT_STABLE_VOLUME = new BooleanSetting("revanced_hide_player_flyout_stable_volume", FALSE);
|
194 | 193 | public static final BooleanSetting HIDE_PLAYER_FLYOUT_WATCH_IN_VR = new BooleanSetting("revanced_hide_player_flyout_watch_in_vr", TRUE);
|
195 |
| - @Deprecated |
196 | 194 | private static final BooleanSetting DEPRECATED_HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER = new BooleanSetting("revanced_hide_video_quality_menu_footer", FALSE);
|
197 | 195 | public static final BooleanSetting HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER = new BooleanSetting("revanced_hide_player_flyout_video_quality_footer", FALSE);
|
198 | 196 |
|
199 | 197 | // General layout
|
200 | 198 | public static final EnumSetting<StartPage> CHANGE_START_PAGE = new EnumSetting<>("revanced_change_start_page", StartPage.ORIGINAL, true);
|
201 | 199 | public static final BooleanSetting SPOOF_APP_VERSION = new BooleanSetting("revanced_spoof_app_version", FALSE, true, "revanced_spoof_app_version_user_dialog_message");
|
202 |
| - public static final StringSetting SPOOF_APP_VERSION_TARGET = new StringSetting("revanced_spoof_app_version_target", "17.41.37", true, parent(SPOOF_APP_VERSION)); |
| 200 | + 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)); |
203 | 201 | public static final BooleanSetting TABLET_LAYOUT = new BooleanSetting("revanced_tablet_layout", FALSE, true, "revanced_tablet_layout_user_dialog_message");
|
204 | 202 | public static final BooleanSetting WIDE_SEARCHBAR = new BooleanSetting("revanced_wide_searchbar", FALSE, true);
|
205 | 203 | public static final BooleanSetting BYPASS_IMAGE_REGION_RESTRICTIONS = new BooleanSetting("revanced_bypass_image_region_restrictions", FALSE, true);
|
@@ -378,12 +376,12 @@ public class Settings extends BaseSettings {
|
378 | 376 | migrateOldSettingToNew(DEPRECATED_SB_UUID_OLD_MIGRATION_SETTING, SB_PRIVATE_USER_ID);
|
379 | 377 |
|
380 | 378 | // Old spoof versions that no longer work reliably.
|
381 |
| - if (SpoofAppVersionPatch.isSpoofingToLessThan("17.33.00")) { |
| 379 | + if (SpoofAppVersionPatch.isSpoofingToLessThan(SPOOF_APP_VERSION_TARGET.defaultValue)) { |
382 | 380 | Logger.printInfo(() -> "Resetting spoof app version target");
|
383 |
| - Settings.SPOOF_APP_VERSION_TARGET.resetToDefault(); |
| 381 | + SPOOF_APP_VERSION_TARGET.resetToDefault(); |
384 | 382 | }
|
385 | 383 |
|
386 |
| - migrateOldSettingToNew(HIDE_PLAYER_BUTTONS, HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS); |
| 384 | + migrateOldSettingToNew(DEPRECATED_HIDE_PLAYER_BUTTONS, HIDE_PLAYER_PREVIOUS_NEXT_BUTTONS); |
387 | 385 |
|
388 | 386 | migrateOldSettingToNew(DEPRECATED_HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER, HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER);
|
389 | 387 |
|
|
0 commit comments