diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-01 12:40:30 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-01 12:40:30 +0300 |
| commit | 27dbaf2b2d5895a091d04aa1c852abb91a619e2d (patch) | |
| tree | 846ba964ee6f0fba52ccb2b1750d44b21c454efb /internal/scanner/scanner_test.go | |
| parent | badc2543eaa319657ecc97453fbdca58679ecb87 (diff) | |
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
Diffstat (limited to 'internal/scanner/scanner_test.go')
| -rw-r--r-- | internal/scanner/scanner_test.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/internal/scanner/scanner_test.go b/internal/scanner/scanner_test.go index 8da32a4..f6299dd 100644 --- a/internal/scanner/scanner_test.go +++ b/internal/scanner/scanner_test.go @@ -345,9 +345,13 @@ func TestFSScanner_Scan(t *testing.T) { } s := newTestScanner(store, prober, &thumb.MockGenerator{}, clk, mfs) + // Unprobeable files are skipped with a log instead of failing the whole scan. err := s.Scan(ctx, "/media") - if err == nil { - t.Fatal("expected error for probe failure") + if err != nil { + t.Fatalf("unexpected error for probe failure; expected skip, got: %v", err) + } + if store.MediaRepo.CreateMediaFunc != nil { + // no media should have been created for the bad file } }) @@ -381,9 +385,10 @@ func TestFSScanner_Scan(t *testing.T) { } s := newTestScanner(store, prober, gen, clk, mfs) + // Thumbnail generation errors are skipped so the scan continues. err := s.Scan(ctx, "/media") - if err == nil { - t.Fatal("expected error for thumbnail failure") + if err != nil { + t.Fatalf("unexpected error for thumbnail failure; expected skip, got: %v", err) } }) |
