batch-e621: just use tags array in JSON
This commit is contained in:
parent
4f7f2ca7fe
commit
b6c82eb4f5
1 changed files with 2 additions and 3 deletions
|
@ -32,8 +32,7 @@ for await (const { url, filename, tags, mtime } of get_files('date:day status:an
|
|||
}
|
||||
|
||||
const last_run = await fs.promises.readFile('batch-e621.json').then(_ => JSON.parse(_.toString())).catch(() => ({}));
|
||||
const normalized_tags = batch.tags.join(' ');
|
||||
if (last_run.db_date === db_date && last_run.normalized_tags === normalized_tags) {
|
||||
if (last_run.db_date === db_date && last_run.tags.join('\n') === batch.tags.join('\n')) {
|
||||
log('SKIPPED - Finding older matching posts from CSV dump');
|
||||
} else {
|
||||
log('Finding older matching posts from CSV dump');
|
||||
|
@ -44,4 +43,4 @@ if (last_run.db_date === db_date && last_run.normalized_tags === normalized_tags
|
|||
}
|
||||
}
|
||||
|
||||
await batch.done() && await fs.promises.writeFile('batch-e621.json', JSON.stringify({ db_date, normalized_tags }));
|
||||
await batch.done() && await fs.promises.writeFile('batch-e621.json', JSON.stringify({ db_date, tags: batch.tags }));
|
||||
|
|
Loading…
Add table
Reference in a new issue