Improved Gamma image sources to prevent cropped images.

This commit is contained in:
DebaucheryLibrarian 2022-01-22 23:20:08 +01:00
parent 86f56695e2
commit c557f0f1f0
1 changed files with 18 additions and 3 deletions

View File

@ -178,8 +178,13 @@ async function getThumbs(entryId, site, parameters) {
if (res.ok && res.body.results?.[0]?.hits[0]?.set_pictures) { if (res.ok && res.body.results?.[0]?.hits[0]?.set_pictures) {
return res.body.results[0].hits[0].set_pictures.map((img) => img.thumb_path && ([ return res.body.results[0].hits[0].set_pictures.map((img) => img.thumb_path && ([
`https://transform.gammacdn.com/photo_set${img.thumb_path}`, `https://images-fame.gammacdn.com/photo_set${img.thumb_path}`,
`https://images01-fame.gammacdn.com/photo_set${img.thumb_path}`,
`https://images02-fame.gammacdn.com/photo_set${img.thumb_path}`,
`https://images03-fame.gammacdn.com/photo_set${img.thumb_path}`,
`https://images04-fame.gammacdn.com/photo_set${img.thumb_path}`,
`https://images-evilangel.gammacdn.com/photo_set${img.thumb_path}`, `https://images-evilangel.gammacdn.com/photo_set${img.thumb_path}`,
`https://transform.gammacdn.com/photo_set${img.thumb_path}`,
])).filter(Boolean); ])).filter(Boolean);
} }
@ -415,12 +420,22 @@ async function scrapeSceneApi(data, site, options) {
if (data.pictures) { if (data.pictures) {
release.poster = [ release.poster = [
...(data.pictures['1920x1080'] ? [ ...(data.pictures['1920x1080'] ? [
`https://transform.gammacdn.com/movies${data.pictures['1920x1080']}`, `https://images-fame.gammacdn.com/movies${data.pictures['1920x1080']}`,
`https://images01-fame.gammacdn.com/movies${data.pictures['1920x1080']}`,
`https://images02-fame.gammacdn.com/movies${data.pictures['1920x1080']}`,
`https://images03-fame.gammacdn.com/movies${data.pictures['1920x1080']}`,
`https://images04-fame.gammacdn.com/movies${data.pictures['1920x1080']}`,
`https://images-evilangel.gammacdn.com/movies${data.pictures['1920x1080']}`, `https://images-evilangel.gammacdn.com/movies${data.pictures['1920x1080']}`,
`https://transform.gammacdn.com/movies${data.pictures['1920x1080']}`,
] : []), ] : []),
...(data.pictures.resized ? [ ...(data.pictures.resized ? [
`https://transform.gammacdn.com/movies${data.pictures.resized}`, `https://images-fame.gammacdn.com/movies${data.pictures.resized}`,
`https://images01-fame.gammacdn.com/movies${data.pictures.resized}`,
`https://images02-fame.gammacdn.com/movies${data.pictures.resized}`,
`https://images03-fame.gammacdn.com/movies${data.pictures.resized}`,
`https://images04-fame.gammacdn.com/movies${data.pictures.resized}`,
`https://images-evilangel.gammacdn.com/movies${data.pictures.resized}`, `https://images-evilangel.gammacdn.com/movies${data.pictures.resized}`,
`https://transform.gammacdn.com/movies${data.pictures.resized}`,
] : []), ] : []),
]; ];
} }