@stremio/stremio-video 0.0.70 → 0.0.72

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 CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@stremio/stremio-video",
3
- "version": "0.0.70",
3
+ "version": "0.0.72",
4
4
  "description": "Abstraction layer on top of different media players",
5
5
  "author": "Smart Code OOD",
6
6
  "main": "src/index.js",
7
7
  "license": "MIT",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/stremio/stremio-video.git"
10
+ "url": "https://github.com/Stremio/stremio-video"
11
11
  },
12
12
  "scripts": {
13
13
  "lint": "eslint src"
@@ -76,11 +76,11 @@ function stremioSubOffsets(offset) {
76
76
  }
77
77
 
78
78
  function stremioSubSizes(size) {
79
- // there is also: 0 (tiny)
80
- if (size <= 100) {
79
+ if (size <= 25) {
80
+ return 0;
81
+ } else if (size <= 100) {
81
82
  return 1;
82
83
  } else if (size <= 125) {
83
- // not used because of 50% step
84
84
  return 2;
85
85
  } else if (size <= 150) {
86
86
  return 3;
@@ -28,7 +28,9 @@ function createTorrent(streamingServerURL, infoHash, fileIdx, sources, seriesInf
28
28
 
29
29
  if (Array.isArray(sources) && sources.length > 0) {
30
30
  body.peerSearch = {
31
- sources: ['dht:' + infoHash].concat(sources).filter(function(source, index, sources) {
31
+ sources: ['dht:' + infoHash].concat(sources.map(function(source) {
32
+ return source.startsWith('tracker:') || source.startsWith('dht:') ? source : 'tracker:' + source;
33
+ })).filter(function(source, index, sources) {
32
34
  return sources.indexOf(source) === index;
33
35
  }),
34
36
  min: 40,