mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-28 11:16:37 +08:00
da1a264d98
Bugs fixed:
- handler/media.go: createLibraryHandler and deleteLibraryHandler
spawned goroutines that called svc.Watcher.Refresh(c.Request.Context()).
Since the HTTP request returns immediately, the context is cancelled
before the watcher finishes. Use context.Background() so the refresh
always completes.
- handler/streaming.go: scrapeLibraryHandler had the same issue with
c.Copy().Request.Context(). Fixed to context.Background().
Smoke test improvements:
- Always create test media files (dummy or ffmpeg), always run scan and
search — only ffprobe-specific assertions (width=320) and HLS are
gated behind HAVE_FFMPEG.
- ID is now always set (from library media list), so history/favourites
/playlists tests never hit an unbound variable.
- NFO + recycle-bin assertions no longer gated behind HAVE_FFMPEG since
they work on any media row (even dummy files).
Verified: go build + go vet + go test all pass; 55/55 endpoint assertions
pass with 0 server 5xx; smoke test 26/26 PASS with and without ffmpeg.