How spotdl/spotify-downloader works
spotDL turns Spotify track, album, playlist, or search queries into song metadata, finds matching audio on YouTube-oriented providers, downloads and converts it, then embeds metadata and optionally lyrics. Its CLI also supports metadata-only save, playlist sync, URL lookup, metadata updates, and a limited single-song web interface. The graph reflects documented capabilities and indexed module references; several provider and command implementations were not excerpted, so their detailed runtime wiring is left out.
Main entry points: downloader.py Download orchestration · search.py Query resolution · entry_point.py CLI dispatch · sync.py Playlist sync
Components 26
User interfaces
- CLI dispatch
spotdl/console/entry_point.py - Download command
spotdl/console/download.py - Save metadata
spotdl/console/save.py - Playlist sync
spotdl/console/sync.py - Metadata update
spotdl/console/meta.py - URL lookup
spotdl/console/url.py
Music catalog
- Query resolution
spotdl/utils/search.py - Spotify client
spotdl/utils/spotify.py - Song metadata
spotdl/types/song.py - Album and playlists
spotdl/types/album.py
Audio and metadata
- Download orchestration
spotdl/download/downloader.py - Audio providers
spotdl/providers/audio/base.py - Lyrics providers
spotdl/providers/lyrics/base.py - Audio conversion
spotdl/utils/ffmpeg.py - Tag and artwork
spotdl/utils/metadata.py - Filename formatting
spotdl/utils/formatter.py
Web interface
- Web command
spotdl/console/web.py - Web server utilities
spotdl/utils/web.py - Web API
spotdl/web/api.py - Web routes
spotdl/web/routes.py
Runtime support
- Settings and config
spotdl/utils/config.py - Option types
spotdl/types/options.py
Other components
- User
- Spotify
- Audio sources
- Local music files
Connections 36
- User → CLI dispatch: runs operation
README.md - CLI dispatch → Download command: dispatches download
spotdl/console/entry_point.py - CLI dispatch → Save metadata: dispatches save
spotdl/console/entry_point.py - CLI dispatch → Playlist sync: dispatches sync
spotdl/console/entry_point.py - CLI dispatch → Metadata update: dispatches meta
spotdl/console/entry_point.py - CLI dispatch → URL lookup: dispatches URL
spotdl/console/entry_point.py - Download command → Download orchestration: starts download
spotdl/console/entry_point.py - Save metadata → Query resolution: resolves query
spotdl/console/save.py - Playlist sync → Query resolution: resolves playlist
spotdl/console/sync.py - Metadata update → Query resolution: resolves songs
spotdl/console/meta.py - URL lookup → Query resolution: resolves query
- Query resolution → Spotify client: queries catalog
spotdl/utils/search.py - Spotify client → Spotify: requests catalog data
spotdl/utils/spotify.py - Query resolution → Song metadata: creates songs
spotdl/utils/search.py - Query resolution → Album and playlists: creates collections
spotdl/utils/search.py - Save metadata → Song metadata: saves metadata
spotdl/console/save.py - Playlist sync → Download orchestration: downloads additions
spotdl/console/sync.py - Metadata update → Tag and artwork: updates tags
spotdl/console/meta.py - Download orchestration → Audio providers: fetches audio
spotdl/download/downloader.py - Audio providers → Audio sources: searches and downloads
- Download orchestration → Lyrics providers: fetches lyrics
spotdl/download/downloader.py - Download orchestration → Audio conversion: converts audio
spotdl/download/downloader.py - Download orchestration → Tag and artwork: embeds metadata
spotdl/download/downloader.py - Download orchestration → Filename formatting: formats output paths
spotdl/download/downloader.py - Download orchestration → Local music files: writes downloads
spotdl/download/downloader.py - Playlist sync → Local music files: compares directory
- CLI dispatch → Settings and config: loads settings
spotdl/console/entry_point.py - Settings and config → Option types: builds typed settings
spotdl/utils/config.py - User → Web command: starts web mode
README.md - Web command → Web server utilities: starts interface
spotdl/console/web.py - Web command → Web API: uses API
spotdl/console/web.py - Web command → Web routes: registers routes
spotdl/console/web.py - Web routes → Download orchestration: downloads song
spotdl/web/routes.py - Web routes → Song metadata: parses song URL
spotdl/web/routes.py - Web API → Query resolution: resolves queries
spotdl/web/api.py - Web routes → User: serves interface