From cd98b9d1471e52d5efc3acb3461e4780f77e5ae3 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Thu, 29 Dec 2022 23:07:08 +0100 Subject: [PATCH] Changed deep merge so base release photos are only used when no deep photos are available. --- src/deep.js | 3 +++ src/utils/http.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/deep.js b/src/deep.js index 9ec4b0ff..bd624bb7 100755 --- a/src/deep.js +++ b/src/deep.js @@ -190,6 +190,9 @@ async function scrapeRelease(baseRelease, entitiesBySlug, type = 'scene') { dedupeStringsInArrayValues: true, hardMergeKeys: ['actors', 'covers', 'poster', 'trailer', 'teaser'], }), + photos: curatedScrapedRelease.photos?.length > 0 + ? curatedScrapedRelease.photos + : baseRelease.photos, deep: !!scrapedRelease, entity, }; diff --git a/src/utils/http.js b/src/utils/http.js index 006a3b2b..29cca79b 100755 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -171,7 +171,7 @@ async function getBrowserSession(identifier, options = {}) { const tab = await browser.newPage(); - logger.verbose(`Opened puppeteer tab${identifier ? `for ${identifier}` : ''}`); + logger.verbose(`Opened puppeteer tab${identifier ? ` for ${identifier}` : ''}`); return { browser, tab }; });