Fixed movie IDs in manticore search query. Fixed animated media identification.

This commit is contained in:
DebaucheryLibrarian
2025-03-05 04:32:51 +01:00
parent f8c38fa1fe
commit ded7fe0595
2 changed files with 9 additions and 3 deletions

View File

@@ -420,10 +420,14 @@ async function storeS3Object(filepath, media) {
async function writeImage(image, media, info, filepath, isProcessed) {
if (isProcessed && info.pages) {
const imageBuffer = await image.toBuffer();
// convert animated image to WebP and write to permanent location
await fs.promises.writeFile(path.join(config.media.path, filepath), imageBuffer);
/*
await image
.webp()
.toFile(path.join(config.media.path, filepath));
*/
return;
}
@@ -476,7 +480,7 @@ async function storeImageFile(media, hashDir, hashSubDir, filename, filedir, fil
fsPromises.mkdir(path.join(config.media.path, lazydir), { recursive: true }),
]);
const image = sharp(media.file.path, { pages: ['trailer', 'teaser'].includes(media.role) ? -1 : 1 }); // don't store posters as animation
const image = sharp(media.file.path, { pages: ['trailers', 'teasers'].includes(media.role) ? -1 : 1 }); // don't store posters as animation
const isProcessed = media.meta.subtype !== 'jpeg' || media.process;
const [info, stats] = await Promise.all([