[addon] fix torrent trackers retrieval for moch downloads

This commit is contained in:
TheBeastLT
2021-03-07 12:18:59 +01:00
parent 76c80e0f2a
commit 651be21948

View File

@@ -21,7 +21,7 @@ function getAllTrackers() {
}
async function getMagnetLink(infoHash) {
const torrent = getTorrent(infoHash).catch(() => ({ infoHash }));
const torrent = await getTorrent(infoHash).catch(() => ({ infoHash }));
const torrentTrackers = torrent.trackers && torrent.trackers.split(',');
const animeTrackers = torrent.type === Type.ANIME ? ALL_TRACKERS : undefined;
const trackers = torrentTrackers || animeTrackers;