Updated faker number call.

This commit is contained in:
DebaucheryLibrarian 2025-05-24 01:32:10 +02:00
parent 69810ea7cb
commit 1a79f7b983
1 changed files with 2 additions and 2 deletions

View File

@ -294,10 +294,10 @@ async function fetchLatest(entity, page, options) {
release.photos = photos.map((photo) => `http://${config.web.host}:${config.web.port}/img/${photo}?id=${nanoid()}`);
}
release.tags = shuffle(options.beforeFetchLatest.tags).slice(0, faker.datatype.number({ min: 3, max: 20 }));
release.tags = shuffle(options.beforeFetchLatest.tags).slice(0, faker.number.int({ min: 3, max: 20 }));
// release.actors = [...generateActors(release), null]; // include empty actor to ensure proper handling
release.actors = shuffle(options.beforeFetchLatest.actors).slice(0, faker.datatype.number(release.tags.some((tag) => ['dp', 'dap', 'gangbang'].includes(tag)) ? { min: 3, max: 6 } : { min: 2, max: 3 }));
release.actors = shuffle(options.beforeFetchLatest.actors).slice(0, faker.number.int(release.tags.some((tag) => ['dp', 'dap', 'gangbang'].includes(tag)) ? { min: 3, max: 6 } : { min: 2, max: 3 }));
release.title = title(release);