diff options
Diffstat (limited to 'pkg/worker/thumbnail_scanner.go')
-rw-r--r-- | pkg/worker/thumbnail_scanner.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/worker/thumbnail_scanner.go b/pkg/worker/thumbnail_scanner.go index cc201b8..168abef 100644 --- a/pkg/worker/thumbnail_scanner.go +++ b/pkg/worker/thumbnail_scanner.go @@ -2,6 +2,7 @@ package worker import ( "context" + "fmt" "math" "os" "path" @@ -47,12 +48,12 @@ func (t *ThumbnailScanner) Process(ctx context.Context, media *repository.Media) if media.IsVideo() { err := fileop.EncodeVideoThumbnail(media.Path, output, 1080, 1080) if err != nil { - return err + return fmt.Errorf("Error thumbnail video %d; %w", media.ID, err) } } else { - err := fileop.EncodeImageThumbnail(media.Path, output, 1080, math.MaxInt) + err := fileop.EncodeImageThumbnail(media.Path, output, 1080, math.MinInt32) if err != nil { - return err + return fmt.Errorf("Error thumbnail image %d; %w", media.ID, err) } } |