mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
check offcloud status of torrent as info from history has inconsistent data
This commit is contained in:
@@ -91,7 +91,9 @@ export async function resolve({ ip, apiKey, infoHash, cachedEntryInfo, fileIndex
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function _resolve(OC, infoHash, cachedEntryInfo, fileIndex) {
|
async function _resolve(OC, infoHash, cachedEntryInfo, fileIndex) {
|
||||||
const torrent = await _createOrFindTorrent(OC, infoHash);
|
const torrent = await _createOrFindTorrent(OC, infoHash)
|
||||||
|
.then(info => info.requestId ? OC.cloud.status(info.requestId) : Promise.resolve(info))
|
||||||
|
.then(info => info.status || info);
|
||||||
if (torrent && statusReady(torrent)) {
|
if (torrent && statusReady(torrent)) {
|
||||||
return _unrestrictLink(OC, infoHash, torrent, cachedEntryInfo, fileIndex);
|
return _unrestrictLink(OC, infoHash, torrent, cachedEntryInfo, fileIndex);
|
||||||
} else if (torrent && statusDownloading(torrent)) {
|
} else if (torrent && statusDownloading(torrent)) {
|
||||||
|
|||||||
8
addon/package-lock.json
generated
8
addon/package-lock.json
generated
@@ -21,7 +21,7 @@
|
|||||||
"magnet-uri": "^6.2.0",
|
"magnet-uri": "^6.2.0",
|
||||||
"name-to-imdb": "^3.0.4",
|
"name-to-imdb": "^3.0.4",
|
||||||
"named-queue": "^2.2.1",
|
"named-queue": "^2.2.1",
|
||||||
"offcloud-api": "^1.0.1",
|
"offcloud-api": "^1.0.2",
|
||||||
"parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#022408972c2a040f846331a912a6a8487746a654",
|
"parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#022408972c2a040f846331a912a6a8487746a654",
|
||||||
"pg": "^8.10.0",
|
"pg": "^8.10.0",
|
||||||
"premiumize-api": "^1.0.3",
|
"premiumize-api": "^1.0.3",
|
||||||
@@ -1369,9 +1369,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/offcloud-api": {
|
"node_modules/offcloud-api": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/offcloud-api/-/offcloud-api-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/offcloud-api/-/offcloud-api-1.0.2.tgz",
|
||||||
"integrity": "sha512-O49iJRy4ein/VcaINw+3wSVWonEd4BEBCLbgD/fyxIHPf7eW1CSYnyEdrm6+E1k/lMlpTcvx7yk/hvh1iLfoOg==",
|
"integrity": "sha512-KOxDX+QIUcI/JEwoXoRGK7P+RygSsmCOta/6bEtKeBMc9CDEnb9xgGNDjDFYCxm6U8rvaOhF9NA02i3EisH9Pw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"request": "^2.83.0"
|
"request": "^2.83.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"magnet-uri": "^6.2.0",
|
"magnet-uri": "^6.2.0",
|
||||||
"name-to-imdb": "^3.0.4",
|
"name-to-imdb": "^3.0.4",
|
||||||
"named-queue": "^2.2.1",
|
"named-queue": "^2.2.1",
|
||||||
"offcloud-api": "^1.0.1",
|
"offcloud-api": "^1.0.2",
|
||||||
"parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#022408972c2a040f846331a912a6a8487746a654",
|
"parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#022408972c2a040f846331a912a6a8487746a654",
|
||||||
"pg": "^8.10.0",
|
"pg": "^8.10.0",
|
||||||
"premiumize-api": "^1.0.3",
|
"premiumize-api": "^1.0.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user