How gidix13579/yt-downloader works
YT Downloader is a local web app for fetching YouTube video or audio onto the device using its browser. The main flow is: submit a YouTube link, inspect available video or playlist information, choose a format and quality, queue a download, then save the completed file (or playlist ZIP). The server also supports LAN/Tailscale access, QR codes, optional PIN protection, and yt-dlp updates. The README documents the browser workflow and capabilities; some frontend and route implementations were not sampled, so those relationships are shown only where documented.
Main entry points: index.js HTTP API and delivery · jobs.js Download queue · index.html Web interface · ytdlp.js YouTube metadata and downloads
Components 18
Browser app
- Web interface
public/index.html - Offline fallback
public/sw.js
HTTP server
- HTTP API and delivery
server/index.js - URL validation
server/validate.js
Download processing
- Download queue
server/jobs.js - YouTube metadata and downloads
server/ytdlp.js - Playlist ZIP writer
server/zip.js - Temporary download files
server/jobs.js
Access and configuration
- PIN authentication
server/auth.js - Server settings
server/config.js - Network discovery
server/network.js - QR generation
server/qr.js - Binary detection
server/bins.js
Other components
- User
- YouTube
- yt-dlp
- ffmpeg
- Client device
Connections 20
- User → Web interface: submits link
README.md - Web interface → HTTP API and delivery: requests information and downloads
README.md - HTTP API and delivery → URL validation: validates links
server/index.js - HTTP API and delivery → PIN authentication: checks access
server/index.js - HTTP API and delivery → Download queue: routes job actions
server/index.js - HTTP API and delivery → QR generation: serves QR
server/index.js - HTTP API and delivery → Network discovery: gets network addresses
server/index.js - HTTP API and delivery → Server settings: loads and saves settings
server/index.js - HTTP API and delivery → YouTube metadata and downloads: requests video information
README.md - Download queue → YouTube metadata and downloads: runs downloads
server/jobs.js - Download queue → URL validation: sanitizes filenames
server/jobs.js - Download queue → Playlist ZIP writer: builds playlist archive
server/jobs.js - Download queue → Temporary download files: writes and cleans up
server/jobs.js - HTTP API and delivery → Temporary download files: streams completed files
server/index.js - YouTube metadata and downloads → yt-dlp: spawns
- yt-dlp → YouTube: fetches media
README.md - yt-dlp → ffmpeg: uses for media processing
README.md - Client device → HTTP API and delivery: connects over LAN or Tailscale
README.md - HTTP API and delivery → Web interface: provides application
- Web interface → Offline fallback: uses service worker