check pm for archive and stream link status

This commit is contained in:
TheBeastLT
2022-04-05 15:41:27 +02:00
parent a689620f74
commit 0ef906dacc
3 changed files with 10 additions and 5 deletions

View File

@@ -120,7 +120,7 @@ async function _unrestrictLink(DL, torrent, fileIndex) {
? torrent.files[fileIndex]
: torrent.files.filter(file => file.downloadPercent === 100).sort((a, b) => b.size - a.size)[0];
if (!targetFile && isArchive(targetFile.downloadUrl)) {
if (!targetFile && torrent.files.every(file => isArchive(file.downloadUrl))) {
console.log(`Only DebridLink archive is available for [${torrent.hashString}] ${fileIndex}`)
return StaticResponse.FAILED_RAR;
}