ffcreator
Advanced tools
Comparing version 1.3.10 to 1.3.11
@@ -86,3 +86,3 @@ 'use strict'; | ||
getTaskState(id) { | ||
for(let taskObj of this.queue){ | ||
for (let taskObj of this.queue) { | ||
if (id === taskObj.id) return taskObj.state; | ||
@@ -99,6 +99,6 @@ } | ||
getResultFile(id) { | ||
for(let taskObj of this.queue){ | ||
for (let taskObj of this.queue) { | ||
if (id === taskObj.id) return taskObj.file; | ||
} | ||
return null; | ||
@@ -317,11 +317,13 @@ } | ||
creator.on('complete', () => { | ||
this.progress.add(taskObj.id); | ||
const file = creator.getFile(); | ||
const result = {id: taskObj.id, file, taskObj}; | ||
taskObj.state = 'complete'; | ||
taskObj.file = file; | ||
try { | ||
this.progress.add(taskObj.id); | ||
const file = creator.getFile(); | ||
const result = {id: taskObj.id, file, taskObj}; | ||
taskObj.state = 'complete'; | ||
taskObj.file = file; | ||
this.event.emit('single-complete', result); | ||
FFLogger.info(`Creator production completed. id:${result.id} file: ${file}`); | ||
} catch (e) {} | ||
this.event.emit('single-complete', result); | ||
setTimeout(this.nextTask.bind(this), this.delay); | ||
FFLogger.info(`Creator production completed. id:${result.id} file: ${file}`); | ||
}); | ||
@@ -328,0 +330,0 @@ }, |
{ | ||
"name": "ffcreator", | ||
"version": "1.3.10", | ||
"version": "1.3.11", | ||
"description": "FFCreator is a lightweight and flexible short video production library", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
191135
6263