- src/buffer_state.go replaces the two sync.Maps plus a global RWMutex with
one bufferMu guarding a map of *Playlist. Each stream has one shared
bufferStream (URL, folder, status, client count, error, cancel hook);
downloaders keep a private ThisStream and publish through helpers.
Playlist.Clients / ThisClient / ClientConnection are gone: there was one
client counter per stream in two places that could disagree.
- bufferAcquireStream does the tuner check and the registration under the
same lock, so two clients tuning at once cannot both pass the limit.
bufferReleaseClient removes the stream when the last client leaves,
cancels its process and deletes its segment folder.
- bufferingStream rewritten: waits on r.Context() instead of the deprecated
CloseNotifier, sets Content-Type before WriteHeader (the old code set
headers after and one was literally named "Content-Length:"), flushes
each segment to the client, no defer inside the segment loop.
- connectToStreamingServer: shared streamHTTPClient with dial, TLS and
response-header timeouts (no overall timeout, bodies are endless); the
deferred Body/segment closes inside the redirect and read loops are now
explicit closes, so a multi-hour stream no longer accumulates them.
- thirdPartyBuffer rewritten around exec.CommandContext: the process is
killed when the last client leaves or when no usable data arrives within
20 s (time.AfterFunc watchdog, no leaked goroutine); cmd.Start error is
checked; no panic; one file handle per segment. ffmpeg and VLC command
lines come from buildFFmpegArgs / buildVLCArgs, which are unit tested.
- Data.Cache.StreamingURLS is guarded by streamingURLsMu and persisted
from a snapshot.
- Tests (src/buffer_test.go, run with -race): restream shares one provider
connection, six concurrent tunes against a tuner limit of two, 50-way
acquire/release contention, cleanup and cancel on last release.
- html/embed.go embeds html/ (pages, css, img, js, video); src/assets.go
serves it, with os.DirFS("html") under -dev. Static assets get an ETag
and Cache-Control: no-cache; HTML pages are still templated (only the
login error message is substituted now).
- Delete the generated src/webUI.go (783 KB base64), src/html-build.go and
cmd/webui-gen; Dockerfile no longer runs a generator.
- Language layer removed: 254 {{.x}} placeholders inlined as English
strings in ts/*.ts and the two auth pages; html/lang/en.json, the
LanguageUI struct and the 'language' setting are gone.
- ts/tsconfig.json + package.json pin typescript 5.9.3; the seven sources
compile (ES2020, global scripts) into one committed html/js/app.js.
Ten unreferenced legacy scripts under html/js/ deleted; all pages load
js/app.js.
- Fix the six type errors that blocked a clean compile, including a real
bug: a missing semicolon in the search shortcut handler made the code
call the result of preventDefault(), so the shortcut threw instead of
focusing the search box.
- /healthz liveness endpoint; Dockerfile healthcheck and README use it.
- Drone: go vet, and a webui-check step that rebuilds the bundle and fails
if the committed app.js is stale.
- README-DEV.md documents build, UI toolchain, -dev, versioning, CI.
- Delete BinaryUpdate, internal/up2date, GitHub/Update structs and the
xteveAutoUpdate / update.url settings (UI rows, en.json, defaults).
Settings-schema migrations kept and moved to src/migrate.go.
- Drop kardianos/osext dependency.
- xteve.go version 0200 -> 0201 to match changelog; Drone now fails on drift.
- go.mod go 1.27.1; Dockerfile and Drone golang images pinned to 1.27.1.
- Fix four go vet unreachable-code warnings.
- .gitignore: .gocache/, agent.md, skill.md. .dockerignore: build context
no longer includes caches, ts/, tasks/ or markdown except the changelog.
- Drone: publish :latest only from master; other branches publish a
branch-named tag so a feature push cannot replace the deployed image.
- Add tasks/improvement-plan.md and tasks/todo.md.
- Regenerate src/webUI.go.