Added redownload option to ignore index file.
This commit is contained in:
parent
24a165cf48
commit
cdd5ed36bf
|
@ -53,6 +53,10 @@ function getArgs() {
|
||||||
describe: 'Only include posts before the oldest or the latest entry in the index',
|
describe: 'Only include posts before the oldest or the latest entry in the index',
|
||||||
options: ['oldest', 'latest'],
|
options: ['oldest', 'latest'],
|
||||||
})
|
})
|
||||||
|
.option('redownload', {
|
||||||
|
describe: 'Ignore index file and force a redownload of everything in the selection. Does not affect [before|after]-indexed',
|
||||||
|
type: 'boolean',
|
||||||
|
})
|
||||||
.option('archives', {
|
.option('archives', {
|
||||||
describe: 'Search archives for deleted posts',
|
describe: 'Search archives for deleted posts',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
|
|
@ -58,7 +58,7 @@ function curatePost(acc, post, user, index, indexed, processed, args) {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (indexed.entries.length) {
|
if (indexed.entries.length) {
|
||||||
if (indexed.entries.find(entry => entry.id === post.id)) {
|
if (!args.redownload && indexed.entries.find(entry => entry.id === post.id)) {
|
||||||
return { ...acc, indexedUpdated: [...acc.indexedUpdated, curatedPost] };
|
return { ...acc, indexedUpdated: [...acc.indexedUpdated, curatedPost] };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue