fix: default vertd speed slider

This commit is contained in:
Maya 2026-02-27 14:10:12 +03:00
parent 3c5a01f0b2
commit b35c863749
No known key found for this signature in database
1 changed files with 5 additions and 4 deletions

View File

@ -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,