1
Fork 0
This commit is contained in:
Théa Grondier 2021-08-22 23:46:17 +02:00
parent 2dadca5e1e
commit 9365cf0f78
1 changed files with 2 additions and 5 deletions

View File

@ -148,12 +148,10 @@ func processPhoto(tx *gorm.DB, imageData *media_encoding.EncodeMediaData, photoC
baseImagePath = path.Join(*photoCachePath, highresName)
newHighResURL, err := generateSaveHighResJPEG(tx, photo, imageData, highresName, baseImagePath, nil)
_, err := generateSaveHighResJPEG(tx, photo, imageData, highresName, baseImagePath, nil)
if err != nil {
return false, err
}
highResURL = newHighResURL
}
} else {
// Verify that highres photo still exists in cache
@ -193,12 +191,11 @@ func processPhoto(tx *gorm.DB, imageData *media_encoding.EncodeMediaData, photoC
thumbnailName := generateUniqueMediaNamePrefixed("thumbnail", photo.Path, ".jpg")
newThumbURL, err := generateSaveThumbnailJPEG(tx, photo, thumbnailName, photoCachePath, baseImagePath, nil)
_, err := generateSaveThumbnailJPEG(tx, photo, thumbnailName, photoCachePath, baseImagePath, nil)
if err != nil {
return false, err
}
thumbURL = newThumbURL
} else {
// Verify that thumbnail photo still exists in cache
thumbPath := path.Join(*photoCachePath, thumbURL.MediaName)