Switched poster URL preference in Gamma scraper to prevent cropped image on XEmpire.

This commit is contained in:
DebaucheryLibrarian 2022-01-25 15:34:15 +01:00
parent 7c1f45bcfb
commit 452f725332
1 changed files with 4 additions and 1 deletions

View File

@ -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}`; // release.movie = `${site.url}/en/movie/${scene.url_movie_title}/${scene.movie_id}`;
return release; return release;
@ -328,8 +331,8 @@ async function scrapeScene({ query }, url, channel, baseRelease, mobileItem, opt
const poster = new URL(videoData.picPreview); const poster = new URL(videoData.picPreview);
release.poster = [ 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}`, `${poster.origin}${poster.pathname}`,
videoData.picPreview,
]; ];
} }