From 27dbaf2b2d5895a091d04aa1c852abb91a619e2d Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 1 May 2026 12:40:30 +0300 Subject: Minimalist UI: hide all elements until activated; add help modal and keyboard shortcuts - Redesign UI to be invisible by default: only header + '?' button shown - Press m to show sidebar, t for toolbar, / for search, ? for help - Add help modal with all keyboard shortcuts - Fix scanner to skip corrupt/unprobeable files instead of aborting - Fix scanner to skip thumbnail errors instead of aborting - Fix rescan to use background context so it completes after HTTP response - Rename project from KISS Media Player to Player --- internal/scanner/scanner.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'internal/scanner/scanner.go') diff --git a/internal/scanner/scanner.go b/internal/scanner/scanner.go index a1effd7..2e82fbe 100644 --- a/internal/scanner/scanner.go +++ b/internal/scanner/scanner.go @@ -132,7 +132,9 @@ func (s *FSScanner) scanSet(ctx context.Context, root, setPath string) error { meta, err := s.prober.Probe(ctx, path) if err != nil { - return fmt.Errorf("probe %q: %w", path, err) + // Skip unprobeable/corrupt files instead of aborting the whole scan. + fmt.Printf("[scanner] skipping unprobeable file %q: %v\n", path, err) + return nil } meta.FileSizeBytes = info.Size() @@ -146,7 +148,10 @@ func (s *FSScanner) scanSet(ctx context.Context, root, setPath string) error { thumbName := strings.TrimSuffix(filepath.Base(path), filepath.Ext(path)) + ".jpg" thumbnailPath = filepath.Join(thumbDir, thumbName) if err := s.thumbGen.Generate(ctx, path, thumbnailPath, meta.Duration); err != nil { - return fmt.Errorf("thumbnail %q: %w", path, err) + // Skip thumbnail generation errors (e.g., corrupt or audio-only video files) + // and continue scanning without a thumbnail. + fmt.Printf("[scanner] skipping thumbnail for %q: %v\n", path, err) + thumbnailPath = "" } } @@ -182,6 +187,11 @@ var mediaExtensions = map[string]struct{}{ } func isMediaFile(path string) bool { + base := filepath.Base(path) + // Skip macOS resource fork files (._*) + if strings.HasPrefix(base, "._") { + return false + } ext := strings.ToLower(filepath.Ext(path)) _, ok := mediaExtensions[ext] return ok -- cgit v1.2.3