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
+6 -1
View File
@@ -70,9 +70,11 @@ 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) {
try {
const posterUrl = new URL(poster);
release.poster = [ release.poster = [
`${posterUrl.origin}${posterUrl.pathname}`, `${posterUrl.origin}${posterUrl.pathname}`,
posterUrl.href, posterUrl.href,
@@ -82,6 +84,9 @@ function scrapeAll(scenes, entity) {
'application/octet-stream': 'image/jpeg', 'application/octet-stream': 'image/jpeg',
}, },
})); }));
} catch (error) {
// nothing needed
}
} }
release.teaser = [ release.teaser = [