diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-19 19:35:02 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-19 19:35:02 +0300 |
| commit | 41bdcb29178fcbcd71fb3663f507736151c018db (patch) | |
| tree | 2a519f878b1d4db13174522ad43c1a0b5c8b2065 /player-android/android/app/src | |
| parent | 965b36f3e09a0d4cdbb69cb3f423ab01fecf2419 (diff) | |
Extract thumbnail path helpers into internal/thumb
The scanner (thumbnailForVideo, thumbnailForImage), the service importer
(generateThumbnail), and writeService.RegenerateThumbnail all reinvented
the same ".thumbnails/<base>.jpg" layout inline. Centralise the
convention in internal/thumb/path.go (ThumbnailDir, ThumbnailNameFor,
ThumbnailPathFor + DirName) so changing the on-disk layout is a one-line
change and the three callers cannot drift apart. Pure path math, no I/O —
callers retain their existing MkdirAll mechanism (scanner FS, os.MkdirAll
in service) for testability.
Covered by table-driven unit tests for trailing slashes, missing
extensions, dotfiles, and multi-dot filenames.
Diffstat (limited to 'player-android/android/app/src')
0 files changed, 0 insertions, 0 deletions
