hopefulyl fixed

This commit is contained in:
Olive Vaughn 2026-08-26 02:26:56 -04:00
parent e9766de877
commit aec97e9972
2 changed files with 6 additions and 22 deletions

View file

@ -6,10 +6,13 @@ WORKDIR /src
RUN git clone https://github.com/pulsejet/memories.git . \ RUN git clone https://github.com/pulsejet/memories.git . \
&& git checkout "$MEMORIES_COMMIT" && git checkout "$MEMORIES_COMMIT"
WORKDIR /src/go-vod WORKDIR /src
COPY patches/go-vod-sheepflix.patch /tmp/go-vod-sheepflix.patch COPY patches/go-vod-sheepflix.patch /tmp/go-vod-sheepflix.patch
RUN git apply /tmp/go-vod-sheepflix.patch \ RUN git apply --check --directory=go-vod /tmp/go-vod-sheepflix.patch \
&& gofmt -w transcoder/handler.go transcoder/stream.go \ && git apply --directory=go-vod /tmp/go-vod-sheepflix.patch
WORKDIR /src/go-vod
RUN gofmt -w transcoder/handler.go transcoder/stream.go \
&& CGO_ENABLED=0 go build -ldflags="-s -w" -o /go-vod . && CGO_ENABLED=0 go build -ldflags="-s -w" -o /go-vod .
# go-vod itself uses Jellyfin's FFmpeg distribution. Pin the stable Jellyfin # go-vod itself uses Jellyfin's FFmpeg distribution. Pin the stable Jellyfin

View file

@ -17,25 +17,6 @@ index 8c5bb08..0ad7458 100644
// Check version if monitoring is enabled // Check version if monitoring is enabled
if h.c.VersionMonitor && !h.versionOk(w, r) { if h.c.VersionMonitor && !h.versionOk(w, r) {
return return
@@ -55,15 +63,15 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
// Serve actual file from manager
- if len(parts) < 3 {
+ if len(parts) < 5 || parts[0] != "vod" {
log.Println("Invalid URL", url)
w.WriteHeader(http.StatusBadRequest)
return
}
// Get streamid and chunk
- streamid := parts[0]
- path := "/" + strings.Join(parts[1:len(parts)-1], "/")
+ streamid := parts[1]
+ path := "/" + strings.Join(parts[2:len(parts)-1], "/")
chunk := parts[len(parts)-1]
// Check if POST request to create temp file
diff --git a/transcoder/stream.go b/transcoder/stream.go diff --git a/transcoder/stream.go b/transcoder/stream.go
index cf353fc..f8694fc 100644 index cf353fc..f8694fc 100644
--- a/transcoder/stream.go --- a/transcoder/stream.go