update 1337x doc type

This commit is contained in:
TheBeastLT
2022-02-18 09:38:44 +01:00
parent 085b654d10
commit 3bc260ff5f
3 changed files with 6 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ async function processTorrentRecord(record) {
function typeMapping() {
const mapping = {};
mapping[leetx.Categories.MOVIE] = Type.MOVIE;
mapping[leetx.Categories.DOCUMENTARIES] = Type.SERIES;
mapping[leetx.Categories.DOCUMENTARIES] = Type.MOVIE;
mapping[leetx.Categories.TV] = Type.SERIES;
mapping[leetx.Categories.ANIME] = Type.ANIME;
return mapping;

View File

@@ -35,7 +35,7 @@ function torrent(torrentId) {
}
function search(query) {
return si.search(query)
return si.search(query, null, { category: Categories.ANIME.ENGLISH})
.then(results => results.map(torrent => parseTorrent(torrent)));
}

View File

@@ -20,6 +20,10 @@ async function scrape() {
// return Promise.all(ids.map(id => limiter.schedule(() => nyaasi.torrent(id)
// .then(torrent => processTorrentRecord(torrent)))))
// .then(() => console.log(`[${moment()}] finished ${NAME} scrape`));
// const queries = ['Sagrada Reset', 'Sakurada Reset'];
// return Promise.all(queries.map(query => limiter.schedule(() => nyaasi.search(query)
// .then(torrents => Promise.all(torrents.map(torrent => limiter.schedule(() => processTorrentRecord(torrent))))))))
// .then(() => console.log(`[${moment()}] finished ${NAME} scrape`));
return scrapeLatestTorrents()
.then(() => {
lastScrape.lastScraped = scrapeStart;