mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
fix selecting offcloud unrestricted link for multi dir torrents
This commit is contained in:
@@ -121,10 +121,9 @@ async function _createTorrent(OC, infoHash) {
|
||||
}
|
||||
|
||||
async function _unrestrictLink(OC, infoHash, torrent, cachedEntryInfo, fileIndex) {
|
||||
const targetFileName = decodeURIComponent(cachedEntryInfo);
|
||||
const files = await OC.cloud.explore(torrent.requestId)
|
||||
const targetFile = Number.isInteger(fileIndex)
|
||||
? files.find(file => file.includes(targetFileName))
|
||||
? files.find(file => file.includes(`/${torrent.requestId}/${fileIndex}/`))
|
||||
: files.find(file => isVideo(file));
|
||||
|
||||
if (!targetFile) {
|
||||
|
||||
Reference in New Issue
Block a user