feat(users/Profpatsch/whatcd-resolver): serve torrent files
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>
This commit is contained in:
parent
10c8f3386b
commit
498c8e05f8
7 changed files with 164 additions and 18 deletions
|
|
@ -85,6 +85,7 @@ pkgs.mkShell {
|
|||
path = "${pkgs.pgformatter}/bin/pg_format";
|
||||
}
|
||||
];
|
||||
WHATCD_RESOLVER_TRANSMISSION_DOWNLOAD_DIRECTORY = "/home/philip/tmp/a/seeding";
|
||||
|
||||
# DECLIB_MASTODON_ACCESS_TOKEN read from `pass` in .envrc.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue