From a634ec318b16995dc8a7267736b1cc7012e7fc71 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Fri, 3 Jun 2022 22:20:44 +0300 Subject: [PATCH] fix downloading status for offcloud --- addon/moch/offcloud.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addon/moch/offcloud.js b/addon/moch/offcloud.js index a8b5247..c09dd5e 100644 --- a/addon/moch/offcloud.js +++ b/addon/moch/offcloud.js @@ -116,8 +116,7 @@ async function _findTorrent(OC, infoHash) { async function _createTorrent(OC, infoHash) { const magnetLink = await getMagnetLink(infoHash); - const response = await OC.cloud.download(magnetLink); - return response + return await OC.cloud.download(magnetLink) } async function _unrestrictLink(OC, infoHash, torrent, cachedEntryInfo, fileIndex) { @@ -139,7 +138,7 @@ async function getDefaultOptions(ip) { } function statusDownloading(torrent) { - return torrent.status === 'created' + return ['downloading', 'created'].includes(torrent.status); } function statusError(torrent) {