Added new bulk upsert utility.

This commit is contained in:
DebaucheryLibrarian
2020-08-14 23:05:25 +02:00
parent b3f784686f
commit e996a45bf5
6 changed files with 42 additions and 25 deletions

View File

@@ -12,9 +12,11 @@ function extractActors(actorString) {
}
function matchActors(actorString, models) {
return models
.filter(model => new RegExp(model.name, 'i')
.test(actorString));
if (!actorString) {
return [];
}
return models.filter(model => new RegExp(model.name, 'i').test(actorString));
}
function scrapeLatest(scenes, site, models) {