[scraper] date handling

This commit is contained in:
TheBeastLT
2020-03-13 15:46:06 +01:00
parent 2b73b56106
commit 21338b3aee
4 changed files with 14 additions and 5 deletions

View File

@@ -61,6 +61,10 @@ async function processTorrentRecord(record) {
if (!torrentFound || !TYPE_MAPPING[torrentFound.category]) {
return createSkipTorrentEntry(record);
}
if (isNaN(torrentFound.uploadDate)) {
console.warn(`Incorrect upload date for [${torrentFound.infoHash}] ${torrentFound.name}`);
return;
}
const torrent = {
infoHash: torrentFound.infoHash,