diff --git a/src/scrapers/manyvids.js b/src/scrapers/manyvids.js index 9c82a7a7..4a822bed 100755 --- a/src/scrapers/manyvids.js +++ b/src/scrapers/manyvids.js @@ -12,6 +12,21 @@ function splitTag(tag) { .trim(); } +function getPoster(url) { + if (!url) { + return null; + } + + return { + src: url, + expectType: { + // older ffmpeg-generated screenshots are served as octet-stream, but they're regular JPEGs + 'application/octet-stream': 'image/jpeg', + 'binary/octet-stream': 'image/jpeg', + }, + }; +} + async function getTrailer(videoId) { if (!videoId) { return null; @@ -81,10 +96,10 @@ async function scrapeScene(data, context) { ...data.tagList?.map((tag) => splitTag(tag.label)) || [], ].filter(Boolean); - release.poster = data.thumbnail?.url || data.screenshot || data.thumbnail; // thumbnail URL is full size, thumbnail direct is thumb sized + release.poster = getPoster(data.thumbnail?.url || data.screenshot || data.thumbnail); // thumbnail URL is full size, thumbnail direct is thumb sized if (data.preview?.url) { - release.trailer = data.preview?.url; + release.trailer = data.preview.url; } else if (context.includeTrailers) { release.trailer = await getTrailer(data.id); }