[crossfade] fix options not saving as numbers

This commit is contained in:
Araxeus
2023-03-16 19:50:54 +02:00
parent 023258f1d7
commit 9f9e991aec

View File

@ -52,7 +52,7 @@ async function promptCrossfadeValues(win, options) {
},
{
label: "Fade scaling",
selectOptions: { linear: "Linear", exponential: "Exponential" },
selectOptions: { linear: "Linear", logarithmic: "Logarithmic" },
value: options.fadeScaling || defaultOptions.fadeScaling,
},
],
@ -64,9 +64,9 @@ async function promptCrossfadeValues(win, options) {
).catch(console.error);
if (!res) return undefined;
return {
fadeInDuration: res[0],
fadeOutDuration: res[1],
exitMusicBeforeEnd: res[2],
fadeInDuration: Number(res[0]),
fadeOutDuration: Number(res[1]),
exitMusicBeforeEnd: Number(res[2]),
fadeScaling: res[3],
};
}