| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
- Add cmd.WaitDelay (10-15s) to ffprobe, ffmpeg remux, and thumbnail generation.
- Add bounded retries with exponential backoff to FFProber.Probe (max 3 attempts).
- Inject *http.Client into podcast ParseFeed, replacing gofeed's default client.
- Update all callers (podcast service, tests, integration tests) to pass client.
- Ensure go test ./... -race -cover passes.
|
|
|
|
|
|
Create a new internal/mediatype package with a single source of truth for:
- Extension-to-media-type mappings (TypeForExt)
- Extension-to-MIME mappings (MIMETypeForExt)
- Supported extension checks (IsSupportedExt, IsImageExt, IsCoverImageExt)
Replace duplicated logic across:
- internal/service/service.go (supportedExtensions, guessMediaType)
- internal/scanner/scanner.go (mediaExtensions, imageExtensions, mediaTypeFromExt)
- internal/api/handlers.go (probe.MimeTypeForFilename)
- internal/probe/probe.go (imageExtensions, isImagePath)
- internal/probe/remux.go (MimeTypeForFilename)
Divergent defaults unified: both scanner and service now default unknown
extensions to video (model.MediaTypeVideo) via mediatype.TypeForExt.
Update tests to use mediatype package and remove obsolete scanner tests.
Update AGENTS.md to reflect the new package.
|
|
to internal/probe
Move LooksLikeMPEGTS, MimeTypeForFilename and the ffmpeg remux path out of the api transport layer into a new internal/probe/remux.go package.
This removes os/exec and mime tables from the api layer, satisfying the DIP principle.
- New probe.Remuxer interface with FFRemuxer implementation
- Server depends on probe.Remuxer, injected via NewServer
- Updated cmd/mediaplayer wiring and all test helpers
- All tests pass: go test ./... -race -cover
|
|
- cmd/mediaplayer: add runWithSignal injection point for testing; cover
version flag, invalid flags, invalid config, normal shutdown, all log
levels, invalid DB, and privileged-port bind failure. Refactor run()
to delegate to runWithSignal with optional signal channel.
- internal/config: allow PORT=0 (ephemeral) to support test server startup.
Update AGENTS.md validation docs accordingly.
- internal/model: add comprehensive ScanProgress tests (Start, Done,
IncrementFile/Set, SetCurrentSet/FilesTotal, Copy isolation, and
concurrent access).
- internal/probe: add image tests for isImagePath (all extensions and
case insensitivity), real EXIF extraction via ImageMagick + exiv2,
Probe against real JPEG, MP4, empty file, and nonexistent paths.
- internal/config_test: replace PORT=0 invalid-value test with PORT=-1.
|
|
- Protect adminService scan state (cancel func + progress pointer) with sync.Mutex.
- Allocate fresh ScanProgress per trigger and pass it to the scanner,
eliminating races on the previously shared progress struct.
- Cancel previous scan context before starting a new one.
- Add tests for cancellation, fresh progress per scan, concurrent triggers,
and empty progress when never started.
- Fix race-prone tests by polling Running==true before waiting for completion.
|
|
|
|
- Update go.mod module path
- Replace all internal imports from github.com/paul/kiss-media-player to codeberg.org/snonux/play
- Run go mod tidy and gofmt -w .
|
|
|
|
- Initialize go.mod (github.com/paul/kiss-media-player)
- Add internal/version.go with const Version
- Add internal/config.go with env-based Config struct and validation
(PORT, MEDIA_ROOT, DB_PATH, MAX_UPLOAD_SIZE_MB, SESSION_TIMEOUT_HOURS,
GC_INTERVAL_MINUTES, SHARE_DEFAULT_EXPIRY_DAYS, LOG_LEVEL)
- Add table-driven config validation tests (defaults, overrides, invalid values)
- Add cmd/mediaplayer/main.go with -version flag
- Create directory scaffold: internal/{model,repository,scanner,probe,thumb,
clock,auth,service,api,setassign}, web/{css,js}, k8s
- Add .gitignore for binaries and data.db
- Refactor env parsing into envInt/envString helpers per go-best-practices
|