Renamed nullDateLimit to noDateLimit in config.

This commit is contained in:
DebaucheryLibrarian 2020-10-20 00:03:22 +02:00
parent 5bdbb5ec62
commit 4a900cbbeb
3 changed files with 4 additions and 4 deletions

View File

@ -189,7 +189,7 @@ module.exports = {
], ],
}, },
fetchAfter: [1, 'week'], fetchAfter: [1, 'week'],
nullDateLimit: 3, noDateLimit: 3,
media: { media: {
path: './media', path: './media',
thumbnailSize: 320, // width for 16:9 will be exactly 576px thumbnailSize: 320, // width for 16:9 will be exactly 576px

View File

@ -145,7 +145,7 @@ const { argv } = yargs
.option('no-date-limit', { .option('no-date-limit', {
describe: 'Limit amount of scenes when dates are missing.', describe: 'Limit amount of scenes when dates are missing.',
type: 'number', type: 'number',
default: config.nullDateLimit, default: config.noDateLimit,
alias: ['null-date-limit', 'limit'], alias: ['null-date-limit', 'limit'],
}) })
.option('page', { .option('page', {

View File

@ -73,7 +73,7 @@ function needNextPage(pageReleases, accReleases, isUpcoming) {
} }
if (!pageReleases.every(release => !!release.date)) { // some scenes don't have dates 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) { 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))) const limitedReleases = (argv.last && releases.slice(0, Math.max(argv.last, 0)))
|| (hasDates && releases.filter(release => moment(release.date).isAfter(argv.after))) || (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 const { uniqueReleases, duplicateReleases } = argv.force
? { uniqueReleases: limitedReleases, duplicateReleases: [] } ? { uniqueReleases: limitedReleases, duplicateReleases: [] }