@pixwel/pixwel-sdk 2.1.34 → 2.1.36

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.
@@ -660,6 +660,10 @@ var Ingest = function (_Model) {
660
660
  ingest.selected.download.tags.Extra = [original.context.tag];
661
661
  }
662
662
 
663
+ if (original.context.revision) {
664
+ ingest.selected.download.version = original.context.revision === 1 ? 'REV' : 'REV' + String(original.context.revision);
665
+ }
666
+
663
667
  if (order.territory) {
664
668
  ingest.selected.download.country = order.territory;
665
669
  }
package/dist/src/Order.js CHANGED
@@ -8,6 +8,10 @@ var _entries = require("babel-runtime/core-js/object/entries");
8
8
 
9
9
  var _entries2 = _interopRequireDefault(_entries);
10
10
 
11
+ var _typeof2 = require("babel-runtime/helpers/typeof");
12
+
13
+ var _typeof3 = _interopRequireDefault(_typeof2);
14
+
11
15
  var _assign = require("babel-runtime/core-js/object/assign");
12
16
 
13
17
  var _assign2 = _interopRequireDefault(_assign);
@@ -56,7 +60,9 @@ var Order = function () {
56
60
  if (!this.dng) {
57
61
  return null;
58
62
  }
59
- if (this.dng === "Graphics Only") return false;
63
+ if ((0, _typeof3.default)(this.dng) !== 'object') {
64
+ return false;
65
+ }
60
66
  if (this.dng.dialogue.includes("Dedicated / Localized")) {
61
67
  return true;
62
68
  }
@@ -75,7 +81,9 @@ var Order = function () {
75
81
  if (!this.dng) {
76
82
  return null;
77
83
  }
78
- if (this.dng === "Graphics Only") return false;
84
+ if (this.dng === 'Subtitled') {
85
+ return true;
86
+ }
79
87
  return _lodash2.default.flattenDeep((0, _entries2.default)(this.dng)).includes("Subtitled");
80
88
  }
81
89
  }]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixwel/pixwel-sdk",
3
3
  "description": "",
4
- "version": "2.1.34",
4
+ "version": "2.1.36",
5
5
  "author": "Pixwel",
6
6
  "license": "UNLICENSED",
7
7
  "main": "./dist/index.js",
package/src/Ingest.js CHANGED
@@ -599,6 +599,10 @@ export default class Ingest extends Model {
599
599
  ingest.selected.download.tags.Extra = [original.context.tag];
600
600
  }
601
601
 
602
+ if (original.context.revision) {
603
+ ingest.selected.download.version = original.context.revision === 1 ? 'REV' : 'REV' + String(original.context.revision);
604
+ }
605
+
602
606
  if (order.territory) {
603
607
  ingest.selected.download.country = order.territory;
604
608
  }
package/src/Order.js CHANGED
@@ -21,7 +21,9 @@ export default class Order {
21
21
  if (!this.dng) {
22
22
  return null;
23
23
  }
24
- if (this.dng === "Graphics Only") return false;
24
+ if (typeof this.dng !== 'object') {
25
+ return false;
26
+ }
25
27
  if (this.dng.dialogue.includes("Dedicated / Localized")) {
26
28
  return true;
27
29
  }
@@ -37,7 +39,9 @@ export default class Order {
37
39
  if (!this.dng) {
38
40
  return null;
39
41
  }
40
- if (this.dng === "Graphics Only") return false;
42
+ if (this.dng === 'Subtitled') {
43
+ return true;
44
+ }
41
45
  return _.flattenDeep(Object.entries(this.dng)).includes("Subtitled");
42
46
  }
43
47
  }
@@ -12,7 +12,7 @@ describe("Order", () => {
12
12
  });
13
13
  expect(order.isDub()).toBe(true);
14
14
  });
15
- it("should NOT set DUB if only Graphics is selected", () => {
15
+ it("should NOT set DUB if DNG contains only Graphics", () => {
16
16
  let order = new Order({
17
17
  dng: {
18
18
  dialogue: [],
@@ -22,12 +22,6 @@ describe("Order", () => {
22
22
  });
23
23
  expect(order.isDub()).toBe(false);
24
24
  });
25
- it("should not set DUB if DNG is Graphics Only", () => {
26
- let order = new Order({
27
- dng: "Graphics Only"
28
- });
29
- expect(order.isDub()).toBe(false);
30
- });
31
25
  });
32
26
  describe("isSub", () => {
33
27
  it("should set SUB if any DNG contains Subtitled", () => {
@@ -40,11 +34,11 @@ describe("Order", () => {
40
34
  });
41
35
  expect(order.isSub()).toBe(true);
42
36
  });
43
- it("should not set SUB if DNG is Graphics Only", () => {
37
+ it("should set SUB if DNG is Subtitled", () => {
44
38
  let order = new Order({
45
- dng: "Graphics Only"
39
+ dng: 'Subtitled'
46
40
  });
47
- expect(order.isSub()).toBe(false);
41
+ expect(order.isSub()).toBe(true);
48
42
  });
49
43
  });
50
44
  });