aboutsummaryrefslogtreecommitdiff
path: root/pkg/worker
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/worker')
-rw-r--r--pkg/worker/scanner/exif_scanner.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/worker/scanner/exif_scanner.go b/pkg/worker/scanner/exif_scanner.go
index da63c0b..c265223 100644
--- a/pkg/worker/scanner/exif_scanner.go
+++ b/pkg/worker/scanner/exif_scanner.go
@@ -30,6 +30,10 @@ func (e *EXIFScanner) Query(ctx context.Context) ([]*repository.Media, error) {
})
}
+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 {