fix: recover transcoder panics, allow AutoDJ edit, add Dockerfile#19
Merged
DatanoiseTV merged 2 commits intomainfrom Apr 16, 2026
Merged
fix: recover transcoder panics, allow AutoDJ edit, add Dockerfile#19DatanoiseTV merged 2 commits intomainfrom
DatanoiseTV merged 2 commits intomainfrom
Conversation
- Wrap performTranscode in a panic recovery so malformed or non-MP3 input can no longer crash the server. The retry loop continues to attempt re-initialization after a recovered panic (#18). - Add StreamerManager.DeleteStreamer which fully removes the streamer from the manager's map, and use it from AutoDJ delete/update handlers so editing an existing AutoDJ no longer fails with "streamer for mount already exists" (#17). - Make music_dir optional when song_command is set, in both the JSON API and HTML form handlers; preserve song_command in the HTML update handler (#17). - Add a multi-stage Dockerfile (frontend -> Go builder -> alpine runtime) and a .dockerignore so the project can be run as a container (#15).
This was referenced Apr 16, 2026
Closed
TestIPWhitelistAndBanning called recordScanAttempt, which invokes logger.L.Warnf on the 10th scan attempt. The package-level logger was nil under `go test ./...`, causing a nil-pointer panic. Mirror the relay package pattern with a package-level init() that calls logger.Init so the logger is ready before any test runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StreamerManager.DeleteStreamerand wire it into the AutoDJ delete/update handlers so editing an AutoDJ no longer fails withstreamer for mount ... already exists(Error when editing AutoDJ streams #17).song_commandon the HTML update handler (Error when editing AutoDJ streams #17)..dockerignoreso the project can be run as a container (Docker image #15).Changes
relay/transcode.go:safePerformTranscodewrapsperformTranscodein adefer/recover; the retry loop continues normally after a recovered panic.relay/streamer.go: newDeleteStreamer(mount)stops the streamer and removes it fromsm.instances.StopStreamerremains as-is (keeps the instance so the UI can restart it).server/handlers_api_v2.go,server/handlers_player.go: delete and update paths callDeleteStreamer;music_diris optional whensong_commandis set;SongCommandnow persisted on HTML form updates.Dockerfile,.dockerignore: container build.Test plan
go build ./...go vet ./...go test ./relay/...(passing; unrelated pre-existing failure inserver/TestIPWhitelistAndBanningremains onmain)docker build -t tinyice .and start the resulting container.Closes #17
Closes #18
Addresses #15