forked from DebaucheryLibrarian/traxxx
Improved actor mapping in release associations. Storing alias ID in actor release association.
This commit is contained in:
@@ -222,7 +222,11 @@ function actors(release) {
|
||||
: Math.floor(Math.random() * 3) + 2;
|
||||
|
||||
return Array.from({ length }, () => ({
|
||||
name: faker.name.findName(),
|
||||
name: faker.name
|
||||
.findName()
|
||||
.split(' ')
|
||||
.slice(0, Math.random() < 0.2 ? 1 : 2) // sometimes only use the first name
|
||||
.join(' '),
|
||||
gender: gender(),
|
||||
}));
|
||||
}
|
||||
@@ -258,8 +262,7 @@ async function fetchLatest(entity, page, options) {
|
||||
.limit(faker.random.number({ min: 2, max: 15 }))
|
||||
.pluck('name');
|
||||
|
||||
// release.actors = [...actors(release), null]; // include empty actor to ensure proper handling
|
||||
release.actors = ['Amber'];
|
||||
release.actors = [...actors(release), null]; // include empty actor to ensure proper handling
|
||||
release.title = title(release);
|
||||
|
||||
return release;
|
||||
|
||||
Reference in New Issue
Block a user