From ae0efccb0425ae236c73175026f6e1ad9f1e2abf Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 13 Jan 2021 16:08:19 +0100 Subject: [PATCH] Skipping Babel, updated node version. Improved deep scrape array merge. --- .nvmrc | 2 +- package.json | 2 +- seeds/02_sites.js | 1 - src/deep.js | 6 +++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.nvmrc b/.nvmrc index 2f5ee741..c91434ab 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14.15.1 +14.15.4 diff --git a/package.json b/package.json index 9fbee3d6..3886ba24 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "All the latest porn releases in one place", "main": "src/app.js", "scripts": { - "start": "node -r source-map-support/register dist/init.js", + "start": "node -r source-map-support/register src/init.js", "webpack": "webpack --env=production --mode=production", "webpack-dev": "webpack --env=development --mode=development", "webpack-watch": "webpack --progress --colors --watch --env=development --mode=development", diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 0a7b1a29..06076246 100644 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -5729,7 +5729,6 @@ const sites = [ name: 'Pinky XXX', slug: 'pinkyxxx', url: 'https://pinkyxxx.com', - independent: true, }, // PORN CZ { diff --git a/src/deep.js b/src/deep.js index c625d730..8fe2bfb7 100644 --- a/src/deep.js +++ b/src/deep.js @@ -123,11 +123,15 @@ async function scrapeRelease(baseRelease, entities, type = 'scene') { : await layoutScraper.fetchMovie(baseRelease.url, entity, baseRelease, include, null); const mergedRelease = { - ...merge(baseRelease, scrapedRelease), + ...merge(baseRelease, scrapedRelease, { + dedupeStringsInArrayValues: true, + }), deep: !!scrapedRelease, entity, }; + console.log(baseRelease, scrapedRelease, mergedRelease); + if (!mergedRelease.entryId) { throw Object.assign(new Error('No entry ID supplied'), { code: 'NO_ENTRY_ID' }); }