mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
update 1337x doc type
This commit is contained in:
@@ -92,7 +92,7 @@ async function processTorrentRecord(record) {
|
|||||||
function typeMapping() {
|
function typeMapping() {
|
||||||
const mapping = {};
|
const mapping = {};
|
||||||
mapping[leetx.Categories.MOVIE] = Type.MOVIE;
|
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.TV] = Type.SERIES;
|
||||||
mapping[leetx.Categories.ANIME] = Type.ANIME;
|
mapping[leetx.Categories.ANIME] = Type.ANIME;
|
||||||
return mapping;
|
return mapping;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ function torrent(torrentId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function search(query) {
|
function search(query) {
|
||||||
return si.search(query)
|
return si.search(query, null, { category: Categories.ANIME.ENGLISH})
|
||||||
.then(results => results.map(torrent => parseTorrent(torrent)));
|
.then(results => results.map(torrent => parseTorrent(torrent)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ async function scrape() {
|
|||||||
// return Promise.all(ids.map(id => limiter.schedule(() => nyaasi.torrent(id)
|
// return Promise.all(ids.map(id => limiter.schedule(() => nyaasi.torrent(id)
|
||||||
// .then(torrent => processTorrentRecord(torrent)))))
|
// .then(torrent => processTorrentRecord(torrent)))))
|
||||||
// .then(() => console.log(`[${moment()}] finished ${NAME} scrape`));
|
// .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()
|
return scrapeLatestTorrents()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
lastScrape.lastScraped = scrapeStart;
|
lastScrape.lastScraped = scrapeStart;
|
||||||
|
|||||||
Reference in New Issue
Block a user