mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-01-11 22:40:22 +00:00
fix selecting offcloud unrestricted link for multi dir torrents
This commit is contained in:
parent
fc9ecaa1f8
commit
6be344423c
1 changed files with 1 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue