Fix Drone YAML, add regex filters and per-playlist buffer mode (backend)
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
- .drone.yml: two command strings contained ": " and were parsed as maps
by Drone's YAML loader ("cannot unmarshal !!map into string"). Quoted.
- Filters: new type "regex-filter". The rule is a Go regular expression
tried against the channel name, the group title and the raw attribute
line; case-insensitive unless the filter is marked case sensitive.
Patterns are validated when the filter is saved and when rules are
rebuilt, and compiled once (cached). The two fixed {include}/!{exclude}
patterns are compiled at package level instead of per stream.
- Per-playlist buffer: a playlist's "buffer" parameter ("-", "xteve",
"ffmpeg", "vlc") overrides the global setting for that playlist in
the stream handler, the buffer start, the tuner lookup and the external
process buffer. Anything else falls back to the global setting.
(UI controls for both follow with the Phase 5 frontend work.)
- Tests: TestRegexFilter, TestBufferModeFor.
This commit is contained in:
+2
-2
@@ -8,7 +8,7 @@ steps:
|
||||
commands:
|
||||
- go mod download
|
||||
- go vet ./...
|
||||
- test -z "$(gofmt -l .)" || (echo "gofmt needed:" && gofmt -l . && exit 1)
|
||||
- 'test -z "$(gofmt -l .)" || (echo "gofmt needed" && gofmt -l . && exit 1)'
|
||||
- go run honnef.co/go/tools/cmd/staticcheck@v0.8.1 ./...
|
||||
- go test ./...
|
||||
|
||||
@@ -26,7 +26,7 @@ steps:
|
||||
- XTEVE_VERSION="$(grep -m1 '^#### ' changelog-beta.md | cut -d' ' -f2 | sed 's/-beta$//')"
|
||||
- test -n "$XTEVE_VERSION" || (echo "Could not parse version from changelog-beta.md" && exit 1)
|
||||
- SRC_VERSION="$(grep -m1 '^var Version = ' xteve.go | cut -d'"' -f2)"
|
||||
- test "$SRC_VERSION" = "$XTEVE_VERSION" || (echo "Version drift: xteve.go has $SRC_VERSION, changelog-beta.md has $XTEVE_VERSION" && exit 1)
|
||||
- 'test "$SRC_VERSION" = "$XTEVE_VERSION" || (echo "Version drift - xteve.go has $SRC_VERSION, changelog-beta.md has $XTEVE_VERSION" && exit 1)'
|
||||
- echo "Building xTeVe version $XTEVE_VERSION from changelog-beta.md"
|
||||
- go build -v -ldflags "-X main.Version=$XTEVE_VERSION" ./...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user