Using poster photo for Pinky XXX.

This commit is contained in:
DebaucheryLibrarian 2021-01-13 01:10:29 +01:00
parent 5d3e3b6cee
commit f95c80f73f
1 changed files with 8 additions and 4 deletions

View File

@ -63,7 +63,7 @@ function scrapeAll(scenes) {
}); });
} }
async function scrapeScene({ query }, channel) { async function scrapeScene({ query }, channel, baseScene) {
const release = {}; const release = {};
release.title = query.cnt('.title'); release.title = query.cnt('.title');
@ -73,7 +73,11 @@ async function scrapeScene({ query }, channel) {
const { poster, trailer } = await getTrailer(release.entryId, channel) || {}; const { poster, trailer } = await getTrailer(release.entryId, channel) || {};
release.poster = poster; release.poster = baseScene?.poster || poster;
release.photos = poster && baseScene?.poster
? [poster, ...baseScene.photos]
: baseScene?.photos;
release.trailer = trailer; release.trailer = trailer;
return release; return release;
@ -96,11 +100,11 @@ async function fetchLatest(channel, page) {
return res.status; return res.status;
} }
async function fetchScene(url, channel) { async function fetchScene(url, channel, baseScene) {
const res = await qu.get(url); const res = await qu.get(url);
if (res.ok) { if (res.ok) {
return scrapeScene(res.item, channel); return scrapeScene(res.item, channel, baseScene);
} }
return res.status; return res.status;