hgfd
This commit is contained in:
@@ -380,8 +380,18 @@ export default new class queue {
|
|||||||
} catch (e) { break; }
|
} catch (e) { break; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (mime.startsWith('image/') && mime != 'image/gif')
|
else if (mime.startsWith('image/') && mime != 'image/gif') {
|
||||||
await this.spawn('magick', [sourcePath + '[0]', '-auto-orient', tmpFile]);
|
if (mime === 'image/avif') {
|
||||||
|
try {
|
||||||
|
await this.spawn('ffmpeg', ['-i', sourcePath, '-frames:v', '1', '-update', '1', tmpFile]);
|
||||||
|
} catch (err) {
|
||||||
|
// If ffmpeg fails, fallback to magick
|
||||||
|
await this.spawn('magick', [sourcePath + '[0]', '-auto-orient', tmpFile]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
await this.spawn('magick', [sourcePath + '[0]', '-auto-orient', tmpFile]);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (mime.startsWith('audio/')) {
|
else if (mime.startsWith('audio/')) {
|
||||||
let coverExtracted = false;
|
let coverExtracted = false;
|
||||||
this._lastCoverExtracted = false; // Reset state for this call
|
this._lastCoverExtracted = false; // Reset state for this call
|
||||||
|
|||||||
Reference in New Issue
Block a user