From 4a900cbbebfd17c0363351f43eabd48b16ffa62d Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Tue, 20 Oct 2020 00:03:22 +0200 Subject: [PATCH] Renamed nullDateLimit to noDateLimit in config. --- config/default.js | 2 +- src/argv.js | 2 +- src/updates.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/default.js b/config/default.js index 39253a88..033ce1ab 100644 --- a/config/default.js +++ b/config/default.js @@ -189,7 +189,7 @@ module.exports = { ], }, fetchAfter: [1, 'week'], - nullDateLimit: 3, + noDateLimit: 3, media: { path: './media', thumbnailSize: 320, // width for 16:9 will be exactly 576px diff --git a/src/argv.js b/src/argv.js index c0f851e3..a0219ca0 100644 --- a/src/argv.js +++ b/src/argv.js @@ -145,7 +145,7 @@ const { argv } = yargs .option('no-date-limit', { describe: 'Limit amount of scenes when dates are missing.', type: 'number', - default: config.nullDateLimit, + default: config.noDateLimit, alias: ['null-date-limit', 'limit'], }) .option('page', { diff --git a/src/updates.js b/src/updates.js index e6714734..a4d1daec 100644 --- a/src/updates.js +++ b/src/updates.js @@ -73,7 +73,7 @@ function needNextPage(pageReleases, accReleases, isUpcoming) { } if (!pageReleases.every(release => !!release.date)) { // some scenes don't have dates - return accReleases.length + pageReleases.length < argv.nullDateLimit; + return accReleases.length + pageReleases.length < argv.noDateLimit; } if (argv.after) { @@ -117,7 +117,7 @@ async function scrapeReleases(scraper, entity, preData, isUpcoming) { const limitedReleases = (argv.last && releases.slice(0, Math.max(argv.last, 0))) || (hasDates && releases.filter(release => moment(release.date).isAfter(argv.after))) - || releases.slice(0, Math.max(argv.nullDateLimit, 0)); + || releases.slice(0, Math.max(argv.noDateLimit, 0)); const { uniqueReleases, duplicateReleases } = argv.force ? { uniqueReleases: limitedReleases, duplicateReleases: [] }