@ormoshe/js-video-url-parser 0.5.13 → 0.5.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/dist/jsVideoUrlParser.js
CHANGED
|
@@ -1793,7 +1793,13 @@
|
|
|
1793
1793
|
var match = url.match(
|
|
1794
1794
|
/(?:videopage)\/([\w-]+)\/([\w-]+)/i
|
|
1795
1795
|
);
|
|
1796
|
-
|
|
1796
|
+
var result = {
|
|
1797
|
+
mediaType: this.mediaTypes.VIDEO,
|
|
1798
|
+
params: params,
|
|
1799
|
+
library: match[1],
|
|
1800
|
+
id: match[2]
|
|
1801
|
+
};
|
|
1802
|
+
return result.id ? result : undefined;
|
|
1797
1803
|
};
|
|
1798
1804
|
|
|
1799
1805
|
Groove.prototype.createUrl = function(baseUrl, vi, params) {
|
|
@@ -1801,8 +1807,8 @@
|
|
|
1801
1807
|
return undefined;
|
|
1802
1808
|
}
|
|
1803
1809
|
|
|
1804
|
-
var url = baseUrl + vi.
|
|
1805
|
-
url += combineParams
|
|
1810
|
+
var url = baseUrl + vi.library + '/' + vi.id;
|
|
1811
|
+
url += combineParams(params);
|
|
1806
1812
|
return url;
|
|
1807
1813
|
};
|
|
1808
1814
|
|
package/lib/provider/groove.js
CHANGED
|
@@ -13,18 +13,15 @@ function Groove() {
|
|
|
13
13
|
|
|
14
14
|
module.exports = Groove;
|
|
15
15
|
|
|
16
|
-
Groove.prototype.
|
|
16
|
+
Groove.prototype.parse = function(url, params) {
|
|
17
17
|
var match = url.match(
|
|
18
18
|
/(?:videopage)\/([\w-]+)\/([\w-]+)/i
|
|
19
19
|
);
|
|
20
|
-
return match ? match[1] + '/' + match[2] : undefined;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
Groove.prototype.parse = function(url, params) {
|
|
24
20
|
var result = {
|
|
25
21
|
mediaType: this.mediaTypes.VIDEO,
|
|
26
22
|
params: params,
|
|
27
|
-
|
|
23
|
+
library: match[1],
|
|
24
|
+
id: match[2]
|
|
28
25
|
};
|
|
29
26
|
return result.id ? result : undefined;
|
|
30
27
|
};
|
|
@@ -34,7 +31,7 @@ Groove.prototype.createUrl = function(baseUrl, vi, params) {
|
|
|
34
31
|
return undefined;
|
|
35
32
|
}
|
|
36
33
|
|
|
37
|
-
var url = baseUrl + vi.id;
|
|
34
|
+
var url = baseUrl + vi.library + '/' + vi.id;
|
|
38
35
|
url += combineParams(params);
|
|
39
36
|
return url;
|
|
40
37
|
};
|
package/package.json
CHANGED