|
- handlers.go: enforce MAX_UPLOAD_SIZE_MB via http.MaxBytesReader and
http.MaxBytesError mapping to 413.
- service/media.go: UploadMedia now verifies owner/admin, rejects unsupported
extensions, probes metadata with ffprobe, generates video thumbnails,
enforces unique filenames, and cleans up temp files + hard-deletes DB row
on any failure.
- Reconcile PLAN.md 500MB -> 100MB default to match AGENTS.md/config.
- Add service and API tests for max-size rejection, unsupported extension,
missing role, probe failure, thumbnail failure, cleanup, and success paths.
|
|
- 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
|