Fixed Bang breaking if scene is missing poster.

This commit is contained in:
DebaucheryLibrarian
2026-11-08 23:52:59 +01:00
parent 34d0f31347
commit 87946580f1
+15 -10
View File
@@ -70,18 +70,23 @@ function scrapeAll(scenes, entity) {
})); }));
const poster = query.img('img[data-videopreview-target="image"]'); const poster = query.img('img[data-videopreview-target="image"]');
const posterUrl = new URL(poster);
if (poster) { if (poster) {
release.poster = [ try {
`${posterUrl.origin}${posterUrl.pathname}`, const posterUrl = new URL(poster);
posterUrl.href,
].map((src) => ({ release.poster = [
src, `${posterUrl.origin}${posterUrl.pathname}`,
expectType: { posterUrl.href,
'application/octet-stream': 'image/jpeg', ].map((src) => ({
}, src,
})); expectType: {
'application/octet-stream': 'image/jpeg',
},
}));
} catch (error) {
// nothing needed
}
} }
release.teaser = [ release.teaser = [