Fix: Correctly display counterpart JPGs for RAWs
This commit is contained in:
parent
a9074dad21
commit
2dadca5e1e
|
@ -121,6 +121,18 @@ func processPhoto(tx *gorm.DB, imageData *media_encoding.EncodeMediaData, photoC
|
|||
return false, errors.Wrap(err, "could determine if media was photo or video")
|
||||
}
|
||||
|
||||
if mediaType.IsRaw() {
|
||||
err = processRawSideCar(tx, imageData, highResURL, thumbURL, photoCachePath)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
counterpartFile := scanForCompressedCounterpartFile(photo.Path)
|
||||
if counterpartFile != nil {
|
||||
imageData.Media.CounterpartPath = counterpartFile
|
||||
}
|
||||
}
|
||||
|
||||
// Generate high res jpeg
|
||||
if highResURL == nil {
|
||||
|
||||
|
@ -202,18 +214,6 @@ func processPhoto(tx *gorm.DB, imageData *media_encoding.EncodeMediaData, photoC
|
|||
}
|
||||
}
|
||||
|
||||
if mediaType.IsRaw() {
|
||||
err = processRawSideCar(tx, imageData, highResURL, thumbURL, photoCachePath)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
counterpartFile := scanForCompressedCounterpartFile(photo.Path)
|
||||
if counterpartFile != nil {
|
||||
photo.CounterpartPath = counterpartFile
|
||||
}
|
||||
}
|
||||
|
||||
return didProcess, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue