@nexrender/core 1.52.1 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/tasks/download.js +3 -1
- package/src/tasks/render.js +24 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexrender/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.53.0",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"author": "Inlife",
|
|
6
6
|
"homepage": "https://www.nexrender.com",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "7c2436fb31a71f1d5c210a96ececdc7070282944"
|
|
44
44
|
}
|
package/src/tasks/download.js
CHANGED
|
@@ -26,7 +26,9 @@ const download = (job, settings, asset) => {
|
|
|
26
26
|
destName = decodeURI(destName) /* < remove/decode any special URI symbols within filename */
|
|
27
27
|
|
|
28
28
|
/* prevent duplicate filename collisions during parallel fetch */
|
|
29
|
-
|
|
29
|
+
if (!asset.sequence) {
|
|
30
|
+
destName = Math.random().toString(36).substring(2) + '-' + destName;
|
|
31
|
+
}
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
/* force asset name if it is provided */
|
package/src/tasks/render.js
CHANGED
|
@@ -3,11 +3,19 @@ const path = require('path')
|
|
|
3
3
|
const {spawn} = require('child_process')
|
|
4
4
|
const {expandEnvironmentVariables, checkForWSL} = require('../helpers/path')
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const translations = {
|
|
7
|
+
"en": {
|
|
8
|
+
"duration": "Duration",
|
|
9
|
+
"error" : "Error",
|
|
10
|
+
"start" : "Start"
|
|
11
|
+
},
|
|
12
|
+
"de": {
|
|
13
|
+
"duration": "Dauer",
|
|
14
|
+
"error" : "Fehler",
|
|
15
|
+
"start" : "Anfang"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
11
19
|
|
|
12
20
|
const option = (params, name, ...values) => {
|
|
13
21
|
if (values !== undefined) {
|
|
@@ -25,6 +33,17 @@ const seconds = (string) => string.split(':')
|
|
|
25
33
|
module.exports = (job, settings) => {
|
|
26
34
|
settings.logger.log(`[${job.uid}] rendering job...`);
|
|
27
35
|
|
|
36
|
+
if(!settings.language) {
|
|
37
|
+
settings.lang = "en"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const progressRegex = /([\d]{1,2}:[\d]{2}:[\d]{2}:[\d]{2})\s+(\(\d+[UL]?\))/gi;
|
|
41
|
+
const durationRegex = new RegExp(translations[settings.language].duration + ":\\s+([\\d]{1,2}:[\\d]{2}:[\\d]{2}:[\\d]{2})", "gi");
|
|
42
|
+
const startRegex = new RegExp(translations[settings.language].start + ":\\s+([\\d]{1,2}:[\\d]{2}:[\\d]{2}:[\\d]{2})", "gi");
|
|
43
|
+
const nexrenderErrorRegex = new RegExp(translations[settings.language].error + ":\\s+(nexrender:.*)$", "gim");
|
|
44
|
+
const errorRegex = new RegExp("aerender " + translations[settings.language].error + ":\\s*(.*)$", "gis");
|
|
45
|
+
|
|
46
|
+
|
|
28
47
|
// create container for our parameters
|
|
29
48
|
let params = [];
|
|
30
49
|
let outputFile = expandEnvironmentVariables(job.output)
|