diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-08-14 09:18:05 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-08-14 09:18:05 +0200 |
commit | a98acb9c8b86a2c2f35841c86d3c3f1d7c176b61 (patch) | |
tree | 786a64e1817c639d860ebbf74b89711232b1bc2a /pkg/worker/scanner | |
parent | fbd9c07b220283072e43681144a31675634637e8 (diff) | |
download | lens-a98acb9c8b86a2c2f35841c86d3c3f1d7c176b61.tar.gz lens-a98acb9c8b86a2c2f35841c86d3c3f1d7c176b61.tar.bz2 lens-a98acb9c8b86a2c2f35841c86d3c3f1d7c176b61.zip |
fix: Add on fail for exif
Also remove unique index from thumbails path, because on fail it saves a
empty path.
Diffstat (limited to 'pkg/worker/scanner')
-rw-r--r-- | pkg/worker/scanner/exif_scanner.go | 4 |
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 { |