Various bug fixes (#2945)

* Only update fingerprints if changed
* Fix panic when loading primary file fails
* Fix gallery/scene association
* Fix display of scene gallery in card
* Use natural_cs collation with paths for title sorting
This commit is contained in:
WithoutPants
2022-09-25 12:07:55 +10:00
committed by GitHub
parent 4089a5fccc
commit 0848b02e93
11 changed files with 145 additions and 26 deletions

View File

@@ -127,7 +127,11 @@ func (rs imageRoutes) ImageCtx(next http.Handler) http.Handler {
}
if image != nil {
_ = image.LoadPrimaryFile(ctx, rs.fileFinder)
if err := image.LoadPrimaryFile(ctx, rs.fileFinder); err != nil {
logger.Errorf("error loading primary file for image %d: %v", imageID, err)
// set image to nil so that it doesn't try to use the primary file
image = nil
}
}
return nil