diff --git a/src/helpers.js b/src/helpers.js index ffd8f3f..a9f0374 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -66,6 +66,7 @@ const helper = { normalizeTitle: (torrent, info) => { let name = '👤 11/2 💾 2 gb ⚙️ therarbg'; + let found = false; const title_list = torrent.title.split("\n"); title_list.forEach(element => { if (element.includes("👤")) { @@ -83,11 +84,18 @@ const helper = { torrent.title = info.name + ' ' + (info.season && info.episode ? ` ${helper.episodeTag(info.season, info.episode)}` : info.year) + '\n'; torrent.title += '\r\n' + name; torrent.seeders = seeds; + found = true; + return; } } - return; + } }); + if (!found) { + torrent.title = info.name + ' ' + (info.season && info.episode ? ` ${helper.episodeTag(info.season, info.episode)}` : info.year) + '\n'; + torrent.title += '\r\n' + name; + torrent.seeders = 11; + } }, extraTag: (name, searchQuery) => { diff --git a/src/index.js b/src/index.js index 0600798..2f7f8ee 100644 --- a/src/index.js +++ b/src/index.js @@ -249,8 +249,7 @@ async function addResults(info, streams, source, signal) { newStream.sources = global.TRACKERS.map(x => { return "tracker:" + x; }).concat(["dht:" + torrent.infoHash]); helper.normalizeTitle(torrent, info) - newStream.title = torrent.title; - newStream.seeders = torrent.seeders; + newStream.behaviorHints = { bingieGroup: "Jackett|" + quality + "|" + newStream.infoHash, }