mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-20 16:57:32 +01:00
feat(youtube/remember-video-quality): remember current quality option
This commit is contained in:
parent
fbaa361c00
commit
90f7392e1a
@ -10,6 +10,7 @@ import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
import app.revanced.integrations.utils.ReVancedUtils;
|
||||
import app.revanced.integrations.utils.SharedPrefHelper;
|
||||
@ -131,6 +132,9 @@ public class VideoQualityPatch {
|
||||
}
|
||||
|
||||
public static void userChangedQuality(int selectedQuality) {
|
||||
// Do not remember a **new** quality if REMEMBER_VIDEO_QUALITY is true
|
||||
if (SettingsEnum.REMEMBER_VIDEO_QUALITY.getBoolean()) return;
|
||||
|
||||
selectedQuality1 = selectedQuality;
|
||||
userChangedQuality = true;
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ public enum SettingsEnum {
|
||||
//Video Settings
|
||||
OLD_STYLE_QUALITY_SETTINGS("revanced_use_old_style_quality_settings", true, ReturnType.BOOLEAN),
|
||||
PREFERRED_VIDEO_SPEED("revanced_pref_video_speed", -2.0f, ReturnType.FLOAT),
|
||||
REMEMBER_VIDEO_QUALITY("revanced_remember_video_quality_selection", true, ReturnType.BOOLEAN),
|
||||
|
||||
//Whitelist Settings
|
||||
//ToDo: Not used atm, Patch missing
|
||||
|
Loading…
x
Reference in New Issue
Block a user