Fixed avatar data type in Vixen scraper.

This commit is contained in:
DebaucheryLibrarian 2023-07-22 00:01:12 +02:00
parent c17e44e9f9
commit 25f3dcf9a5
1 changed files with 7 additions and 1 deletions

View File

@ -23,7 +23,13 @@ function getAvatarFallbacks(avatar) {
.sort((imageA, imageB) => imageB.height - imageA.height)
.map((image) => [image.highdpi?.['3x'], image.highdpi?.triple, image.highdpi?.['2x'], image.highdpi?.double, image.src])
.flat()
.filter(Boolean);
.filter(Boolean)
.map((source) => ({
src: source,
expectType: {
'binary/octet-stream': 'image/jpeg',
},
}));
}
function curateSources(sources, type = 'image/jpeg') {