We want to be able to play the files directly from the web browser (jukebox). Luckily, transmission does not seem to change the filenames from the ones given by the torrent file, so we can literally parse the torrent file and construct a path to the media file, extraordinary. Adjusts the caddy reverse proxy to serve the given transmission directory (using my weird sshfs forwarding scheme in the shell.nix preset lol), then redirect from a handler that maps from torrentId/fileId to the actual file. Change-Id: Iab5faf7cc06066f3253031af31e137c0e28f54e3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13270 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de> |
||
|---|---|---|
| .. | ||
| services | ||
| src | ||
| .gitignore | ||
| build.ninja | ||
| default.nix | ||
| Main.hs | ||
| notes.org | ||
| README.md | ||
| server-notes.org | ||
| whatcd-resolver.cabal | ||
whatcd-resolver
To run:
ninja run-services
in one terminal (starts the background tasks)
ninja run
to start the server. It runs on 9092.
You need to be in the nix-shell in ./...
You need to set the pass key internet/redacted/api-keys/whatcd-resolver to an API key for RED.
You need to have a transmission-rpc-daemon listening on port 9091 (no auth, try ssh port forwarding lol).