From 452f7253327162e63a30959e251cf5e6fb912026 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Tue, 25 Jan 2022 15:34:15 +0100 Subject: [PATCH] Switched poster URL preference in Gamma scraper to prevent cropped image on XEmpire. --- src/scrapers/gamma.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scrapers/gamma.js b/src/scrapers/gamma.js index 8f3ec407..e12b4df4 100644 --- a/src/scrapers/gamma.js +++ b/src/scrapers/gamma.js @@ -255,6 +255,9 @@ async function scrapeApiReleases(json, site) { ]; } + console.log(scene); + console.log(release); + // release.movie = `${site.url}/en/movie/${scene.url_movie_title}/${scene.movie_id}`; return release; @@ -328,8 +331,8 @@ async function scrapeScene({ query }, url, channel, baseRelease, mobileItem, opt const poster = new URL(videoData.picPreview); release.poster = [ + videoData.picPreview, // prefer original URL with width and height parameters, without may give a square crop on e.g. XEmpire `${poster.origin}${poster.pathname}`, - videoData.picPreview, ]; }