mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 21:27:43 +02:00
feat(YouTube Music - Player components): Add settings Change seekbar position
and Enable thick seekbar
(YouTube Music 7.29.51+, close https://github.com/inotia00/ReVanced_Extended/issues/2770)
This commit is contained in:
@ -29,10 +29,14 @@ public class PlayerPatch {
|
||||
Settings.ADD_MINIPLAYER_PREVIOUS_BUTTON.get();
|
||||
private static final boolean CHANGE_PLAYER_BACKGROUND_COLOR =
|
||||
Settings.CHANGE_PLAYER_BACKGROUND_COLOR.get();
|
||||
private static final boolean CHANGE_SEEK_BAR_POSITION =
|
||||
Settings.CHANGE_SEEK_BAR_POSITION.get();
|
||||
private static final boolean DISABLE_PLAYER_GESTURE =
|
||||
Settings.DISABLE_PLAYER_GESTURE.get();
|
||||
private static final boolean ENABLE_SWIPE_TO_DISMISS_MINIPLAYER =
|
||||
Settings.ENABLE_SWIPE_TO_DISMISS_MINIPLAYER.get();
|
||||
private static final boolean ENABLE_THICK_SEEKBAR =
|
||||
Settings.ENABLE_THICK_SEEKBAR.get();
|
||||
private static final boolean ENABLE_ZEN_MODE =
|
||||
Settings.ENABLE_ZEN_MODE.get();
|
||||
private static final boolean ENABLE_ZEN_MODE_PODCAST =
|
||||
@ -108,6 +112,12 @@ public class PlayerPatch {
|
||||
return colors;
|
||||
}
|
||||
|
||||
public static boolean changeSeekBarPosition(boolean original) {
|
||||
return SETTINGS_INITIALIZED
|
||||
? CHANGE_SEEK_BAR_POSITION
|
||||
: original;
|
||||
}
|
||||
|
||||
public static boolean disableMiniPlayerGesture() {
|
||||
return Settings.DISABLE_MINIPLAYER_GESTURE.get();
|
||||
}
|
||||
@ -186,6 +196,12 @@ public class PlayerPatch {
|
||||
return ENABLE_SWIPE_TO_DISMISS_MINIPLAYER ? null : object;
|
||||
}
|
||||
|
||||
public static boolean enableThickSeekBar(boolean original) {
|
||||
return SETTINGS_INITIALIZED
|
||||
? ENABLE_THICK_SEEKBAR
|
||||
: original;
|
||||
}
|
||||
|
||||
public static int enableZenMode(int originalColor) {
|
||||
if (ENABLE_ZEN_MODE && originalColor == MUSIC_VIDEO_BACKGROUND_COLOR) {
|
||||
final VideoType videoType = VideoType.getCurrent();
|
||||
|
@ -139,10 +139,12 @@ public class Settings extends BaseSettings {
|
||||
public static final BooleanSetting CHANGE_PLAYER_BACKGROUND_COLOR = new BooleanSetting("revanced_change_player_background_color", FALSE, true);
|
||||
public static final StringSetting CUSTOM_PLAYER_BACKGROUND_COLOR_PRIMARY = new StringSetting("revanced_custom_player_background_color_primary", "#000000", true);
|
||||
public static final StringSetting CUSTOM_PLAYER_BACKGROUND_COLOR_SECONDARY = new StringSetting("revanced_custom_player_background_color_secondary", "#000000", true);
|
||||
public static final BooleanSetting CHANGE_SEEK_BAR_POSITION = new BooleanSetting("revanced_change_seekbar_position", FALSE, true);
|
||||
public static final BooleanSetting DISABLE_MINIPLAYER_GESTURE = new BooleanSetting("revanced_disable_miniplayer_gesture", FALSE, true);
|
||||
public static final BooleanSetting DISABLE_PLAYER_GESTURE = new BooleanSetting("revanced_disable_player_gesture", FALSE, true);
|
||||
public static final BooleanSetting ENABLE_FORCED_MINIPLAYER = new BooleanSetting("revanced_enable_forced_miniplayer", TRUE);
|
||||
public static final BooleanSetting ENABLE_SWIPE_TO_DISMISS_MINIPLAYER = new BooleanSetting("revanced_enable_swipe_to_dismiss_miniplayer", TRUE, true);
|
||||
public static final BooleanSetting ENABLE_THICK_SEEKBAR = new BooleanSetting("revanced_enable_thick_seekbar", TRUE, true);
|
||||
public static final BooleanSetting ENABLE_ZEN_MODE = new BooleanSetting("revanced_enable_zen_mode", FALSE, true);
|
||||
public static final BooleanSetting ENABLE_ZEN_MODE_PODCAST = new BooleanSetting("revanced_enable_zen_mode_podcast", FALSE, true);
|
||||
public static final BooleanSetting HIDE_COMMENT_CHANNEL_GUIDELINES = new BooleanSetting("revanced_hide_comment_channel_guidelines", TRUE);
|
||||
|
Reference in New Issue
Block a user