Skip to content

Commit 39c9b16

Browse files
committed
refactor: fix input/output assignment on updateOutput() and encode() in Editor component.
1 parent a5540f6 commit 39c9b16

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/components/Editor.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ export default {
232232
this.cmd = ffmpeg.build(opt);
233233
},
234234
updateOutput() {
235-
if (this.form.output) {
236-
const { format, output } = this.form;
237-
const ext = path.extname(output);
235+
if (this.form.io.output) {
236+
const { format, io } = this.form;
237+
const ext = path.extname(io.output);
238238
if (ext) {
239-
this.form.output = `${output.replace(ext, `.${format.container}`)}`;
239+
this.form.io.output = `${io.output.replace(ext, `.${format.container}`)}`;
240240
}
241241
}
242242
},
@@ -268,15 +268,15 @@ export default {
268268
this.preset.name = this.preset.name || this.preset.id;
269269
},
270270
encode() {
271-
const { input, output } = this.form;
271+
const { input, output } = this.form.io;
272272
const json = util.transformToJSON(this.form);
273273
storage.add('queue', {
274274
id: Date.now(),
275275
type: 'encode',
276276
payload: json,
277277
status: 'queued',
278-
input: input.name,
279-
output: output.name,
278+
input,
279+
output,
280280
_showDetails: false,
281281
});
282282
this.$emit('onEncode');

0 commit comments

Comments
 (0)