ManyVids expects octet-stream for JPEG.

This commit is contained in:
DebaucheryLibrarian
2026-11-27 03:03:27 +01:00
parent f7952963fe
commit 074a51cce2
+17 -2
View File
@@ -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);
}