v0.1.1: external modules, publish YAML, proxy reset, binary-first README
All checks were successful
release / build-and-upload (push) Successful in 6m8s
modules-release / build-and-upload (push) Successful in 4m47s

- Host discovers/builds modules under modules/ (bbc, rte, tg4)
- module-publish.yaml tracked; local module.yaml gitignored
- drm --modules-dir / DRM_MODULES_DIR
- drm proxy reset; Magisk reinject reliability
- modules-v* Forgejo release workflow + build scripts
- BBC full Explore channel map including S4C
- README quickstart based on release binaries
This commit is contained in:
404errordeveloper 2026-10-08 23:16:14 +02:00
parent 1d36961a7c
commit f9c28be3f1
52 changed files with 2915 additions and 636 deletions

View file

@ -17,34 +17,35 @@ What it deliberately does not do: break DRM. The CDM used is a provisioned
Widevine device you supply (`.wvd`); the system only automates the request flow a
real client performs.
## One binary
## Host + external modules
```text
┌──────────────────────── bin/drm ────────────────────────┐
│ │
modules ───┤ capture catalog agent serve proxy │
linked in │ │
└─────────────────────────────────────────────────────────┘
│ capture catalog agent serve proxy │
│ │ │
│ └── modhost: discover / build / exec │
└───────────────────────┬─────────────────────────────────┘
│
modules/<name>/ (Go CLI + module.yaml + .bin/)
```
`apps/cli` is the only `main`. It blank-imports `drmdecryption/modules/all`, which
is what makes `--app <name>` resolve. Each app module registers itself:
`apps/cli` is the only host `main`. Providers are **not** linked into `drm.exe`.
Each `modules/<name>/` is a small CLI (`describe`, `launch`, `autoplay`, `catalog`)
that the host builds on demand into `modules/<name>/.bin/` and runs as a
subprocess. Shared library code may still live under `apps/modules/<name>/` for
the external CLI to import via `replace`.
```go
func init() {
appreg.Register(Name, New) // --app rte
appreg.RegisterFlags(bindFlags) // --rte.<field> overrides
}
```
Adding a provider means adding a folder under `modules/` — no rebuild of `drm`.
Point at another tree with `drm --modules-dir DIR` or `$DRM_MODULES_DIR`.
Adding a provider means adding a package and one import line. There is no plugin
loading, no scripting runtime, and nothing to deploy beside the binary.
Host releases use `v*` tags. Provider zips use separate `modules-v*` tags
(`module-bbc-….zip`, `module-rte-….zip`, `module-tg4-….zip`). Tracked
`module-publish.yaml` is renamed to `module.yaml` inside those zips; local
secrets stay in a gitignored `module.yaml` on disk.
## Logic vs values
This is the central constraint:
| `apps/modules/<name>/*.go` — **tracked** | `apps/modules/<name>/module.yaml` — **gitignored** (bbc published) |
| `modules/<name>/*.go` (+ optional `apps/modules/<name>/`) | `modules/<name>/module.yaml` |
|---|---|
| launch + auto-play sequence | android package id |
| navigation idioms (chip→Play, drawer→Live) | license URL, origin hostnames |
@ -53,24 +54,10 @@ This is the central constraint:
| which capture fields are required | UI selector regexes, labels, aliases |
Module Go source contains no account id, policy key, video id, license URL, origin
host or KID. Values arrive by **flag → environment → module.yaml → Go default**,
host or KID. Values arrive by **environment → module.yaml → Go default**,
and only mechanical things (timeouts, DASH timescales, card geometry) have
defaults in code.
`.gitignore` enforces the split:
```gitignore
apps/modules/**
!apps/modules/README.md
!apps/modules/go.mod
!apps/modules/go.sum
!apps/modules/*/
!apps/modules/*/*.go
!apps/modules/*/**/*.go
```
The directory re-include is required — git will not descend into an excluded
directory to find negated files.
defaults in code. BBC's `module.yaml` is published; other providers' values stay
local.
## Go modules