Skip to content

Commit

Permalink
fix(creator): FFCreatorCenter cannot customize the fileName
Browse files Browse the repository at this point in the history
  • Loading branch information
electroluxcode committed Dec 19, 2024
1 parent abbbb11 commit ab20dfe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ const Renderer = require('./core/renderer');
const FFmpegUtil = require('./utils/ffmpeg');
const Effects = require('./animate/effects');
const { Application, Loader, settings, destroyAndCleanAllCache } = require('inkpaint');
const cloneDeep = require('lodash/cloneDeep');

class FFCreator extends FFCon {
_userConf
constructor(conf = {}) {
super({ type: 'creator', ...conf });

this.audios = [];
this.inCenter = false;
this._userConf = cloneDeep(conf)
this.conf = new Conf(conf);
this.loader = new Loader();
this.destroyed = false;
Expand Down Expand Up @@ -98,7 +101,7 @@ class FFCreator extends FFCon {
*/
generateOutput() {
const ext = this.getConf('ext');
const outputDir = this.getConf('outputDir');
const outputDir = this._userConf["outputDir"];
if (this.inCenter && outputDir) {
this.setOutput(path.join(outputDir, `${Utils.genUuid()}.${ext}`));
}
Expand Down

0 comments on commit ab20dfe

Please sign in to comment.