2026-03-31 18:48:10 -04:00
2026-04-02 17:14:05 -04:00
2026-04-02 17:14:05 -04:00
2026-03-31 16:23:37 -04:00
2026-03-31 20:54:23 -04:00
2026-04-02 17:14:05 -04:00
2025-08-29 20:22:34 -04:00
2025-08-29 20:22:34 -04:00
2026-04-02 17:14:05 -04:00
2025-01-26 16:57:17 -05:00

Running youdis

build and run the docker container

-v [host_downloads]:/downloads
-v [host_config]:/config
-e ENABLE_DISCORD=1
-e DISCORD_BOT_TOKEN=<token>
-e DISCORD_BOT_SCOPE=<scope-int>

config contains data to persist across container updates, i.e., unraid appdata, such as yt-dlp's archive.txt

Development

v2 architecture draft: docs/architecture-v2.org

The app runs with youdis.py. This starts the backend first, waits for health, then starts each enabled adapter explicitly.

Test components directly with uvicorn:

python3 -m uvicorn youdis.main:app --host 127.0.0.1 --port 8000
python3 -m youdis.adapters.discord

Key runner/config vars:

YOUDIS_ENABLE_BACKEND=1  #default enabled, dont disable unless testing
YOUDIS_BACKEND_HOST=127.0.0.1
YOUDIS_BACKEND_PORT=8000
YOUDIS_BACKEND_HEALTH_TIMEOUT=20
YOUDIS_BACKEND_HEALTH_INTERVAL=0.5
YOUDIS_POLL_INTERVAL_SECONDS=2
YOUDIS_YTDLP_EXECUTABLE=yt-dlp
YOUDIS_CONFIG_DIR=/path/to/config/
YOUDIS_DOWNLOAD_DIR=/path/to/downloads/
ENABLE_DISCORD=1
DISCORD_BOT_TOKEN=<token-string>
DISCORD_BOT_SCOPE=123456789

Add Adapter

Configure adapter selection in .env, like so:

YOUDIS_RUN_BACKEND=1
YOUDIS_BACKEND_HOST=127.0.0.1
YOUDIS_BACKEND_PORT=8000
ENABLE_DISCORD=1
DISCORD_BOT_TOKEN=<api_key>
DISCORD_BOT_SCOPE=123456789

to add a new adapter:

  1. add youdis/adapters/<adapter>.py
  2. make it independently runnable
  3. add start_<adapter>() to youdis.py
  4. register it in the explicit adapter starter map in youdis.py
  5. add ENABLE_<adapter> and supporting env vars to .env.example
Description
discord bot wrapper for yt-dlp
Readme Unlicense 331 KiB
Languages
Python 87.2%
Shell 12.8%