How glomatico/gytmdl works
Gytmdl is a command-line YouTube Music downloader. Its main flow accepts song, album, playlist, or artist URLs, resolves tracks, retrieves metadata and audio, then writes tagged files and optional synced lyrics or cover images. The sampled CLI and downloader support these calls; artist selection, configuration, and advertised features are represented where documented, but unsampled implementation details and wiring are kept conservative.
Main entry points: cli.py Command workflow · downloader.py Downloader · utils.py Path validation
Components 20
CLI and configuration
- Command workflow
gytmdl/cli.py - Config loading
gytmdl/cli.py - Path validation
gytmdl/utils.py
Music resolution
- Downloader
gytmdl/downloader.py - Artist selection
gytmdl/downloader.py
Track processing
- Track metadata
gytmdl/downloader.py - Audio download
gytmdl/downloader.py - Tag and cover embedding
gytmdl/downloader.py - Cover retrieval
gytmdl/downloader.py - Synced lyrics
gytmdl/downloader.py
Output artifacts
- Audio files
- LRC files
- Cover files
Other components
- CLI user
- YouTube Music API
- yt-dlp
- Interactive selection
- FFmpeg remux
- YouTube Music
- Cover image server
Connections 24
- CLI user → Command workflow: provides URLs/options
- Command workflow → Config loading: loads settings
- Command workflow → Path validation: validates cookies
- Command workflow → Downloader: creates and calls
- Downloader → YouTube Music API: queries metadata
- Downloader → yt-dlp: resolves and downloads
- Downloader → Artist selection: resolves artist URLs
- Artist selection → Interactive selection: prompts selection
- Artist selection → YouTube Music API: lists albums
- Command workflow → Track metadata: gets track tags
- Track metadata → YouTube Music API: fetches lyrics and album data
- Command workflow → Audio download: downloads track
- Command workflow → Tag and cover embedding: applies tags
- Command workflow → Cover retrieval: gets cover details
- Command workflow → Synced lyrics: gets synced lyrics
- Audio download → yt-dlp: fetches audio
- Command workflow → FFmpeg remux: requests remux
- Tag and cover embedding → Cover image server: fetches cover bytes
- Cover retrieval → Cover image server: downloads image
- Synced lyrics → YouTube Music API: requests synced lyrics
- Command workflow → Audio files: writes track
- Command workflow → LRC files: writes LRC
- Command workflow → Cover files: optionally saves cover
- Command workflow → Audio download: optionally selects aria2c mode