@pixwel/pixwel-sdk 2.1.13 → 2.1.15
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/coverage/clover.xml +502 -496
- package/coverage/coverage-final.json +9 -9
- package/coverage/lcov-report/Ass.js.html +212 -212
- package/coverage/lcov-report/Asset.js.html +27 -27
- package/coverage/lcov-report/AssetType.js.html +1 -1
- package/coverage/lcov-report/Encode.js.html +1 -1
- package/coverage/lcov-report/File.js.html +1 -1
- package/coverage/lcov-report/Filename.js.html +1 -1
- package/coverage/lcov-report/Ingest.js.html +70 -64
- package/coverage/lcov-report/IngestFile.js.html +1 -1
- package/coverage/lcov-report/Model.js.html +136 -136
- package/coverage/lcov-report/Order.js.html +3 -3
- package/coverage/lcov-report/Srt.js.html +102 -102
- package/coverage/lcov-report/Sub.js.html +43 -43
- package/coverage/lcov-report/Tag.js.html +1 -1
- package/coverage/lcov-report/TimeFormat.js.html +63 -63
- package/coverage/lcov-report/fileType.js.html +4 -4
- package/coverage/lcov-report/index.html +77 -77
- package/coverage/lcov.info +939 -928
- package/dist/src/Ingest.js +3 -2
- package/package.json +1 -1
- package/src/Ingest.js +4 -2
- package/test/Ingest.spec.js +42 -0
package/dist/src/Ingest.js
CHANGED
|
@@ -90,13 +90,11 @@ var Ingest = function (_Model) {
|
|
|
90
90
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : params = {},
|
|
91
91
|
allTags = _ref.allTags,
|
|
92
92
|
allTypes = _ref.allTypes,
|
|
93
|
-
order = _ref.order,
|
|
94
93
|
extension = _ref.extension;
|
|
95
94
|
|
|
96
95
|
var asset = this.data().asset;
|
|
97
96
|
var options = this.data().selected.download;
|
|
98
97
|
var mediaType = this.data().asset.mediaType;
|
|
99
|
-
var filename = this.data().filename;
|
|
100
98
|
|
|
101
99
|
if (!asset.project) {
|
|
102
100
|
throw new Error("missing asset.project");
|
|
@@ -264,6 +262,9 @@ var Ingest = function (_Model) {
|
|
|
264
262
|
parts = parts.push(matchedSet);
|
|
265
263
|
} else if (mediaType == "video" && tags.Resolution && !requiredInfo) {
|
|
266
264
|
parts = parts.push(tags.Resolution.replace(/\d+x/, ""));
|
|
265
|
+
} else if (mediaType == "video" && tags.Aspect && tags.Standard) {
|
|
266
|
+
var encodeName = tags.Standard.toUpperCase() + "-" + tags.Aspect.replace(':', 'X');
|
|
267
|
+
parts = parts.push("" + encodeName);
|
|
267
268
|
} else if (mediaType == "image" && tags.Resolution) {
|
|
268
269
|
parts = parts.push(tags.Resolution);
|
|
269
270
|
}
|
package/package.json
CHANGED
package/src/Ingest.js
CHANGED
|
@@ -42,11 +42,10 @@ export default class Ingest extends Model {
|
|
|
42
42
|
*
|
|
43
43
|
* @param {object} params
|
|
44
44
|
*/
|
|
45
|
-
renderFilename({ allTags, allTypes,
|
|
45
|
+
renderFilename({ allTags, allTypes, extension } = (params = {})) {
|
|
46
46
|
let asset = this.data().asset;
|
|
47
47
|
let options = this.data().selected.download;
|
|
48
48
|
let mediaType = this.data().asset.mediaType;
|
|
49
|
-
let filename = this.data().filename;
|
|
50
49
|
|
|
51
50
|
if (!asset.project) {
|
|
52
51
|
throw new Error("missing asset.project");
|
|
@@ -234,6 +233,9 @@ export default class Ingest extends Model {
|
|
|
234
233
|
parts = parts.push(matchedSet);
|
|
235
234
|
} else if (mediaType == "video" && tags.Resolution && !requiredInfo) {
|
|
236
235
|
parts = parts.push(tags.Resolution.replace(/\d+x/, ""));
|
|
236
|
+
} else if (mediaType == "video" && tags.Aspect && tags.Standard) {
|
|
237
|
+
let encodeName = `${tags.Standard.toUpperCase()}-${tags.Aspect.replace(':', 'X')}`;
|
|
238
|
+
parts = parts.push(`${encodeName}`);
|
|
237
239
|
} else if (mediaType == "image" && tags.Resolution) {
|
|
238
240
|
parts = parts.push(tags.Resolution);
|
|
239
241
|
}
|
package/test/Ingest.spec.js
CHANGED
|
@@ -677,6 +677,48 @@ describe("Ingest", () => {
|
|
|
677
677
|
"TESTPROJECT_ITR-TEST-ASSET-A_ENG_TXTD_COMING-SOON_HOJE_PRORES_1080p2997.mp4"
|
|
678
678
|
);
|
|
679
679
|
});
|
|
680
|
+
it("includes Standard and Aspect", function() {
|
|
681
|
+
let data = {
|
|
682
|
+
asset: {
|
|
683
|
+
name: "Test Asset A",
|
|
684
|
+
slug: "test-asset-a",
|
|
685
|
+
type: "trailer.intl",
|
|
686
|
+
mediaType: "video",
|
|
687
|
+
project: {
|
|
688
|
+
filePrefix: "TESTPROJECT"
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
filename: {
|
|
692
|
+
file: {
|
|
693
|
+
ext: "mp4"
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
selected: {
|
|
697
|
+
download: {
|
|
698
|
+
language: "ENG",
|
|
699
|
+
country: "WW",
|
|
700
|
+
tags: {
|
|
701
|
+
Standard: "ntsc",
|
|
702
|
+
Aspect: "16:9",
|
|
703
|
+
Resolution: "1920x1080",
|
|
704
|
+
"Frame Mode": "progressive",
|
|
705
|
+
Framerate: "29.97",
|
|
706
|
+
Text: "txtd",
|
|
707
|
+
Extra: ["COMING-SOON", "HOJE"],
|
|
708
|
+
Codec: "PRORES"
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
let ingest = new Ingest(data);
|
|
714
|
+
let allTags = [];
|
|
715
|
+
let allTypes = [{ name: "film-clip.intl" }];
|
|
716
|
+
let extension = "mp4";
|
|
717
|
+
let name = ingest.renderFilename({ allTags, allTypes, extension });
|
|
718
|
+
expect(name).toBe(
|
|
719
|
+
"TESTPROJECT_ITR-TEST-ASSET-A_ENG_TXTD_COMING-SOON_HOJE_PRORES_NTSC-16X9_1080p2997.mp4"
|
|
720
|
+
);
|
|
721
|
+
});
|
|
680
722
|
it("renders `set` tags when all tags in `set` are specified but retains `codec`", function() {
|
|
681
723
|
let data = {
|
|
682
724
|
asset: {
|