This commit is contained in:
@@ -17,6 +17,8 @@ RUN XTEVE_VERSION="$(grep -m1 '^#### ' changelog-beta.md | cut -d' ' -f2 | sed '
|
|||||||
&& CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
&& CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||||
go build -trimpath -ldflags="-s -w -X main.Version=$XTEVE_VERSION" -o /out/xteve ./xteve.go
|
go build -trimpath -ldflags="-s -w -X main.Version=$XTEVE_VERSION" -o /out/xteve ./xteve.go
|
||||||
|
|
||||||
|
FROM mwader/static-ffmpeg:latest AS ffmpeg
|
||||||
|
|
||||||
FROM alpine:3.23
|
FROM alpine:3.23
|
||||||
|
|
||||||
RUN apk add --no-cache ca-certificates tzdata \
|
RUN apk add --no-cache ca-certificates tzdata \
|
||||||
@@ -28,6 +30,8 @@ RUN apk add --no-cache ca-certificates tzdata \
|
|||||||
WORKDIR /xteve
|
WORKDIR /xteve
|
||||||
|
|
||||||
COPY --from=builder /out/xteve /usr/local/bin/xteve
|
COPY --from=builder /out/xteve /usr/local/bin/xteve
|
||||||
|
COPY --from=ffmpeg /ffmpeg /usr/local/bin/ffmpeg
|
||||||
|
COPY --from=ffmpeg /ffprobe /usr/local/bin/ffprobe
|
||||||
COPY docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
COPY docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
USER xteve
|
USER xteve
|
||||||
|
|||||||
@@ -105,6 +105,14 @@ func loadSettings() (settings SettingsStruct, err error) {
|
|||||||
dataMap["m3u"] = make(map[string]interface{})
|
dataMap["m3u"] = make(map[string]interface{})
|
||||||
dataMap["hdhr"] = make(map[string]interface{})
|
dataMap["hdhr"] = make(map[string]interface{})
|
||||||
|
|
||||||
|
defaultFFmpegPath := ""
|
||||||
|
if len(os.Getenv("XTEVE_CONFIG")) > 0 {
|
||||||
|
containerFFmpegPath := "/usr/local/bin/ffmpeg"
|
||||||
|
if checkFile(containerFFmpegPath) == nil {
|
||||||
|
defaultFFmpegPath = containerFFmpegPath
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
defaults["api"] = false
|
defaults["api"] = false
|
||||||
defaults["use_plexAPI"] = false
|
defaults["use_plexAPI"] = false
|
||||||
defaults["plex.url"] = ""
|
defaults["plex.url"] = ""
|
||||||
@@ -121,6 +129,7 @@ func loadSettings() (settings SettingsStruct, err error) {
|
|||||||
defaults["buffer.timeout"] = 500
|
defaults["buffer.timeout"] = 500
|
||||||
defaults["cache.images"] = false
|
defaults["cache.images"] = false
|
||||||
defaults["epgSource"] = "PMS"
|
defaults["epgSource"] = "PMS"
|
||||||
|
defaults["ffmpeg.path"] = defaultFFmpegPath
|
||||||
defaults["ffmpeg.options"] = System.FFmpeg.DefaultOptions
|
defaults["ffmpeg.options"] = System.FFmpeg.DefaultOptions
|
||||||
defaults["vlc.options"] = System.VLC.DefaultOptions
|
defaults["vlc.options"] = System.VLC.DefaultOptions
|
||||||
defaults["files"] = dataMap
|
defaults["files"] = dataMap
|
||||||
@@ -170,8 +179,13 @@ func loadSettings() (settings SettingsStruct, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(settings.FFmpegPath) == 0 {
|
if len(settings.FFmpegPath) == 0 {
|
||||||
|
containerFFmpegPath := "/usr/local/bin/ffmpeg"
|
||||||
|
if len(os.Getenv("XTEVE_CONFIG")) > 0 && checkFile(containerFFmpegPath) == nil {
|
||||||
|
settings.FFmpegPath = containerFFmpegPath
|
||||||
|
} else {
|
||||||
settings.FFmpegPath = searchFileInOS("ffmpeg")
|
settings.FFmpegPath = searchFileInOS("ffmpeg")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if len(settings.VLCPath) == 0 {
|
if len(settings.VLCPath) == 0 {
|
||||||
settings.VLCPath = searchFileInOS("cvlc")
|
settings.VLCPath = searchFileInOS("cvlc")
|
||||||
|
|||||||
Reference in New Issue
Block a user