mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 04:05:39 -04:00
feat(server): consider JpgFromRaw2
tag for embedded previews (#17123)
* add jpgfromraw2 * unused catch
This commit is contained in:
parent
efcb1129ce
commit
8c50e3e80e
@ -43,14 +43,18 @@ export class MediaRepository {
|
|||||||
|
|
||||||
async extract(input: string, output: string): Promise<boolean> {
|
async extract(input: string, output: string): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
await exiftool.extractJpgFromRaw(input, output);
|
await exiftool.extractBinaryTag('JpgFromRaw2', input, output);
|
||||||
} catch (error: any) {
|
} catch {
|
||||||
this.logger.debug('Could not extract JPEG from image, trying preview', error.message);
|
|
||||||
try {
|
try {
|
||||||
await exiftool.extractPreview(input, output);
|
await exiftool.extractJpgFromRaw(input, output);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
this.logger.debug('Could not extract preview from image', error.message);
|
this.logger.debug('Could not extract JPEG from image, trying preview', error.message);
|
||||||
return false;
|
try {
|
||||||
|
await exiftool.extractPreview(input, output);
|
||||||
|
} catch (error: any) {
|
||||||
|
this.logger.debug('Could not extract preview from image', error.message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user