Jack Jackson 0a2da8eb51 Add tests
This uses the `docker compose run --rm` approach suggested by Dudo
[here](https://github.com/orgs/gitops-ci-cd/discussions/1). I'm...still
learning my around it. It has some learning curve - especially regarding
running integration tests (the current setup _keeps_ the app running
even after tests have terminated, which is probably not as-desired), but
I suspect it'll become second-nature pretty quickly and will have
outsized benefits when working in a team with heterogeneous workstation
setups.
2025-02-02 20:05:42 -08:00
2025-02-02 20:05:42 -08:00
2025-02-02 20:05:42 -08:00
2025-02-02 20:05:42 -08:00
2025-02-02 20:05:42 -08:00
2025-02-02 20:05:42 -08:00
2025-02-02 20:05:42 -08:00
2024-11-03 14:02:10 -08:00
2025-02-02 20:05:42 -08:00

This package puts yt-dlp behind an HTTP-callable server.

Motivation: I had a little snippet of bash that I could run on one of my *arr Pods to install the yt-dlp CLI tool and then use it to download the audio of a video at a given URL. That worked, but was awkward - especially having to reinstall the tool any time a Pod was reinitialized. With this setup, I can deploy a light image alongside the Arr Pods that can be invoked over HTTP to download whatever URL I'm interested in, without having to do a kubectl exec to shell into the existing pods.

There are tons of improvements that could be made to this, such as:

  • not hard-coding the audio format (I've picked the one that appears to work best for my Jellyfin setup), or indeed allowing the passthrough of oher customizations.
  • running this process as a Kubernetes job, or some other separated long-running job mechanism
    • exposing logs more-easily
  • using a more secure and robust server implementation than http.server
  • filename customization (using the --output flag)
  • Testing :P

Customization

Environment variables:

  • DOWNLOAD_DIR sets the directory into-which to download files (defaults to .)
  • PORT sets the port to listen on (default to 8000)
Description
No description provided
Readme 32 KiB
Languages
Python 85.3%
Dockerfile 14.7%