Added beforeNetwork hook, used by MindGeek. Added Filthy Kings to Gamma.

This commit is contained in:
DebaucheryLibrarian
2021-10-27 17:19:23 +02:00
parent e5ad1648eb
commit a22c4d5679
13 changed files with 25 additions and 9 deletions

View File

@@ -112,7 +112,7 @@ async function scrapeRelease(baseRelease, entitiesBySlug, type = 'scene') {
const options = {
...include,
beforeFetchScene: entity.preData,
beforeFetchScenes: entity.preData,
parameters: getRecursiveParameters(entity),
};
@@ -172,8 +172,8 @@ async function scrapeRelease(baseRelease, entitiesBySlug, type = 'scene') {
async function scrapeReleases(baseReleases, entitiesBySlug, type) {
const entitiesWithBeforeDataEntries = await Promise.all(Object.entries(entitiesBySlug).map(async ([slug, entity]) => {
if (entity.scraper?.beforeFetchScene) {
const preData = await entity.scraper.beforeFetchScene(entity);
if (entity.scraper?.beforeFetchScenes) {
const preData = await entity.scraper.beforeFetchScenes(entity);
return [slug, { ...entity, preData }];
}