mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-01-11 22:40:22 +00:00
do not include invalid tr when creating magnet
This commit is contained in:
parent
394c2fab42
commit
1a02cb2004
1 changed files with 3 additions and 3 deletions
|
|
@ -62,9 +62,9 @@ let ALL_RUSSIAN_TRACKERS = [];
|
|||
|
||||
export async function getMagnetLink(infoHash) {
|
||||
const torrent = await getTorrent(infoHash).catch(() => ({ infoHash }));
|
||||
const torrentTrackers = torrent?.trackers?.split(',');
|
||||
const animeTrackers = torrent.type === Type.ANIME ? ALL_ANIME_TRACKERS : undefined;
|
||||
const providerTrackers = RUSSIAN_PROVIDERS.includes(torrent.provider) && ALL_RUSSIAN_TRACKERS;
|
||||
const torrentTrackers = torrent?.trackers?.split(',') || [];
|
||||
const animeTrackers = torrent.type === Type.ANIME ? ALL_ANIME_TRACKERS : [];
|
||||
const providerTrackers = RUSSIAN_PROVIDERS.includes(torrent.provider) && ALL_RUSSIAN_TRACKERS || [];
|
||||
const trackers = unique([].concat(torrentTrackers).concat(animeTrackers).concat(providerTrackers));
|
||||
|
||||
return trackers
|
||||
|
|
|
|||
Loading…
Reference in a new issue