diff --git a/lib/creator.js b/lib/creator.js index 4fe51c7..ab414a4 100755 --- a/lib/creator.js +++ b/lib/creator.js @@ -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; @@ -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}`)); }