Fixed release actor crash when no actors are present.

This commit is contained in:
DebaucheryLibrarian 2021-01-13 15:43:53 +01:00
parent bf814c0b9d
commit cdd4220cb9
2 changed files with 2 additions and 2 deletions

View File

@ -861,7 +861,7 @@ async function associateActors(releases, batchId) {
const baseActors = Object.values(baseActorsByReleaseId).flat();
if (baseActors.length === 0) {
return null;
return [];
}
const baseActorsBySlug = baseActors.reduce((acc, baseActor) => ({

View File

@ -321,7 +321,7 @@ async function storeScenes(releases) {
// media is more error-prone, associate separately
await associateReleaseMedia(releasesWithId);
if (argv.sceneActors) {
if (argv.sceneActors && actors) {
await scrapeActors(actors.map(actor => actor.name));
}