lens @ a98acb9c8b86a2c2f35841c86d3c3f1d7c176b61

fix: Add on fail for exif

Also remove unique index from thumbails path, because on fail it saves a
empty path.
diff --git a/pkg/database/sql/media.go b/pkg/database/sql/media.go
index 4b48608a19f623d1b6021171ce0942fd88d10fbb..b13e267211958c82af7dafd03db2bd0b750cb5a4 100644
--- a/pkg/database/sql/media.go
+++ b/pkg/database/sql/media.go
@@ -43,8 +43,8 @@ 	}
 
 	MediaThumbnail struct {
 		gorm.Model
-		Path    string `gorm:"not null;unique"`
-		MediaID uint   `gorm:"not null"`
+		Path    string
+		MediaID uint `gorm:"not null"`
 		Media   Media
 	}
 
diff --git a/pkg/worker/scanner/exif_scanner.go b/pkg/worker/scanner/exif_scanner.go
index da63c0b790a1491c49c7b0ad3b8cf3bdcc91baa3..c265223786ad32e266ec2809d6731471d0688787 100644
--- a/pkg/worker/scanner/exif_scanner.go
+++ b/pkg/worker/scanner/exif_scanner.go
@@ -30,6 +30,10 @@ 		Size: 100,
 	})
 }
 
+func (t *EXIFScanner) OnFail(ctx context.Context, media *repository.Media, _ error) {
+	_ = t.repository.CreateEXIF(ctx, media.ID, &repository.MediaEXIF{})
+}
+
 func (e *EXIFScanner) Process(ctx context.Context, m *repository.Media) error {
 	exif, err := coroutine.WrapProcess(ctx, func() (*repository.MediaEXIF, error) { return fileop.ReadExif(m.Path) })
 	if err != nil {