mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-01-11 22:40:22 +00:00
improve offcloud link resolving
This commit is contained in:
parent
9c92b2100f
commit
a83eef99da
1 changed files with 2 additions and 2 deletions
|
|
@ -136,8 +136,8 @@ async function _retryCreateTorrent(OC, infoHash, cachedEntryInfo, fileIndex) {
|
|||
async function _unrestrictLink(OC, infoHash, torrent, cachedEntryInfo, fileIndex) {
|
||||
const targetFileName = decodeURIComponent(cachedEntryInfo);
|
||||
const files = await _getFileUrls(OC, torrent)
|
||||
const targetFile = files.find(file => file.includes(`/${torrent.requestId}/${fileIndex}/`))
|
||||
|| files.find(file => sameFilename(targetFileName, file.split('/').pop()))
|
||||
const targetFile = files.find(file => sameFilename(targetFileName, file.split('/').pop()))
|
||||
|| files.find(file => file.includes(`/${torrent.requestId}/${fileIndex}/`))
|
||||
|| files.find(file => isVideo(file))
|
||||
|| files.pop();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue