mirror of https://github.com/VERT-sh/VERT.git
fix: default vertd speed slider
This commit is contained in:
parent
3c5a01f0b2
commit
b35c863749
|
|
@ -183,9 +183,7 @@ const progressEstimate = (
|
||||||
return progress * progressEstimates[type] + previousValues;
|
return progress * progressEstimates[type] + previousValues;
|
||||||
};
|
};
|
||||||
|
|
||||||
const processSettings = (
|
const processSettings = (settings: ConversionSettings): ConversionSettings => {
|
||||||
settings: ConversionSettings,
|
|
||||||
): ConversionSettings => {
|
|
||||||
const newSettings = { ...settings };
|
const newSettings = { ...settings };
|
||||||
|
|
||||||
if (newSettings.fps === "custom") {
|
if (newSettings.fps === "custom") {
|
||||||
|
|
@ -413,6 +411,9 @@ export class VertdConverter extends Converter {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// get default vertd speed
|
||||||
|
const defaultSpeed = Settings.instance.settings.vertdSpeed;
|
||||||
|
const defaultSpeedIndex = vertdSpeedValues.indexOf(defaultSpeed);
|
||||||
const qualitySpeedRange: SettingDefinition = {
|
const qualitySpeedRange: SettingDefinition = {
|
||||||
key: "vertdSpeedSlider",
|
key: "vertdSpeedSlider",
|
||||||
label: m["convert.settings.video.speed"](),
|
label: m["convert.settings.video.speed"](),
|
||||||
|
|
@ -421,7 +422,7 @@ export class VertdConverter extends Converter {
|
||||||
min: 0,
|
min: 0,
|
||||||
max: qualityOptions.length - 1,
|
max: qualityOptions.length - 1,
|
||||||
step: 1,
|
step: 1,
|
||||||
default: 3,
|
default: defaultSpeedIndex !== -1 ? defaultSpeedIndex : 3,
|
||||||
options: qualityOptions.map((option, index) => ({
|
options: qualityOptions.map((option, index) => ({
|
||||||
value: index,
|
value: index,
|
||||||
label: option.label,
|
label: option.label,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue