streamd: optional keys, per-stream proxy, auto deps; agent module.yaml sync; RTE AutoPlay; Telegram release announces
- streamd: MPD-only start, proxy field, ffmpeg/NRE/mp4decrypt auto-install - GET/PUT /api/modules for module.yaml sync; agent sync_modules - RTE Live-tab AutoPlay fixes; modules zip named bbc/rte/tg4.zip - Telegram notify scripts wired into Forgejo release workflows
This commit is contained in:
parent
f9c28be3f1
commit
ac8701b5a6
36 changed files with 1460 additions and 143 deletions
|
|
@ -17,6 +17,7 @@ import (
|
|||
|
||||
"drmdecryption/apps/streamd/internal/api"
|
||||
"drmdecryption/apps/streamd/internal/db"
|
||||
"drmdecryption/apps/streamd/internal/deps"
|
||||
"drmdecryption/apps/streamd/internal/supervisor"
|
||||
"drmdecryption/apps/streamd/internal/ui"
|
||||
"drmdecryption/apps/streamd/internal/ws"
|
||||
|
|
@ -54,9 +55,11 @@ serve flags:
|
|||
--bind listen address (default 0.0.0.0:8083)
|
||||
--data data dir for sqlite + www + work (default .cache/streamd)
|
||||
--token shared bearer token for mutating API (or STREAMD_TOKEN)
|
||||
--nre path to N_m3u8DL-RE (else NRE_PATH, bin/, PATH)
|
||||
--ffmpeg path to ffmpeg (else FFMPEG_PATH, bin/, PATH)
|
||||
--mp4decrypt path to mp4decrypt (else MP4DECRYPT_PATH, bin/, PATH)
|
||||
--nre path to N_m3u8DL-RE (else NRE_PATH, bin/, PATH, auto-download)
|
||||
--ffmpeg path to ffmpeg (else FFMPEG_PATH, bin/, PATH, auto-download)
|
||||
--mp4decrypt path to mp4decrypt (else MP4DECRYPT_PATH, bin/, PATH, auto-download)
|
||||
--bin-dir where to install/look for media tools (default <repo>/bin)
|
||||
--skip-deps do not auto-download missing ffmpeg / N_m3u8DL-RE / mp4decrypt
|
||||
`)
|
||||
}
|
||||
|
||||
|
|
@ -68,6 +71,8 @@ func serveCmd(args []string) {
|
|||
nre := fs.String("nre", "", "N_m3u8DL-RE binary")
|
||||
ffmpeg := fs.String("ffmpeg", "", "ffmpeg binary")
|
||||
mp4decrypt := fs.String("mp4decrypt", "", "mp4decrypt binary")
|
||||
binDir := fs.String("bin-dir", "", "directory for media tool binaries (default <repo>/bin)")
|
||||
skipDeps := fs.Bool("skip-deps", false, "skip auto-download of missing media tools")
|
||||
_ = fs.Parse(args)
|
||||
|
||||
dataDir := *data
|
||||
|
|
@ -91,24 +96,14 @@ func serveCmd(args []string) {
|
|||
}
|
||||
defer store.Close()
|
||||
|
||||
nrePath := firstExisting(*nre,
|
||||
os.Getenv("NRE_PATH"),
|
||||
os.Getenv("N_M3U8DL_RE"),
|
||||
filepath.Join("bin", "N_m3u8DL-RE.exe"),
|
||||
"N_m3u8DL-RE",
|
||||
)
|
||||
ffPath := firstExisting(*ffmpeg,
|
||||
os.Getenv("FFMPEG_PATH"),
|
||||
os.Getenv("FFMPEG"),
|
||||
filepath.Join("bin", "ffmpeg.exe"),
|
||||
"ffmpeg",
|
||||
)
|
||||
decPath := firstExisting(*mp4decrypt,
|
||||
os.Getenv("MP4DECRYPT_PATH"),
|
||||
os.Getenv("MP4DECRYPT"),
|
||||
filepath.Join("bin", "mp4decrypt.exe"),
|
||||
"mp4decrypt",
|
||||
)
|
||||
depStatus, _ := deps.Ensure(deps.Options{
|
||||
BinDir: *binDir,
|
||||
SkipDownload: *skipDeps,
|
||||
Log: log.Default(),
|
||||
}, *nre, *ffmpeg, *mp4decrypt)
|
||||
nrePath := depStatus.NRE
|
||||
ffPath := depStatus.FFmpeg
|
||||
decPath := depStatus.MP4Decrypt
|
||||
|
||||
sup := supervisor.NewMedia(supervisor.Options{
|
||||
Store: store,
|
||||
|
|
@ -125,6 +120,7 @@ func serveCmd(args []string) {
|
|||
Token: tok,
|
||||
Supervisor: sup,
|
||||
StartedAt: time.Now(),
|
||||
Deps: depStatus,
|
||||
}
|
||||
hub := ws.NewHub(store, tok, log.Default())
|
||||
|
||||
|
|
@ -161,7 +157,7 @@ func serveCmd(args []string) {
|
|||
return
|
||||
}
|
||||
for _, st := range list {
|
||||
if !st.Enabled || strings.TrimSpace(st.MPD) == "" || strings.TrimSpace(st.Key) == "" {
|
||||
if !st.Enabled || strings.TrimSpace(st.MPD) == "" {
|
||||
continue
|
||||
}
|
||||
mpd := strings.ToLower(strings.TrimSpace(st.MPD))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue