How 0xhjk/music-dl works
Music-dl is a command-line music search and download aggregator. Users search across selected providers, or supply a supported song or playlist URL; results can be filtered, selected, downloaded, and optionally played. Provider add-ons retrieve provider-specific metadata and download information, while shared song handling saves audio and optional lyrics or cover art. The README also documents proxy support, sorting and deduplication, and quality preferences. Edges reflect shown calls and documented capabilities; some add-ons were not excerpted, so their internal behavior is represented conservatively.
Main entry points: api.py HTTP API client · source.py Source router · __main__.py Command workflow · song.py Song downloads
Components 17
CLI workflow
- Command workflow
music_dl/__main__.py
Source routing
- Source router
music_dl/source.py
Music providers
- Baidu add-on
music_dl/addons/baidu.py - Kugou add-on
music_dl/addons/kugou.py - Netease add-on
music_dl/addons/netease.py - QQ add-on
music_dl/addons/qq.py - Migu add-on
music_dl/addons/migu.py - Xiami add-on
music_dl/addons/xiami.py
Shared runtime
- HTTP API client
music_dl/api.py - Song downloads
music_dl/song.py - Runtime options
music_dl/config.py - Playlist player
music_dl/player.py - Domain errors
music_dl/exceptions.py - Version metadata
music_dl/__version__.py
Other components
- CLI user
- Music websites
- Local files
Connections 22
- CLI user → Command workflow: invokes
README.md - Command workflow → Runtime options: sets options
music_dl/__main__.py - Command workflow → Source router: searches or resolves
music_dl/__main__.py - Source router → Baidu add-on: dispatches
music_dl/source.py - Source router → Kugou add-on: dispatches
music_dl/source.py - Source router → Netease add-on: dispatches
music_dl/source.py - Source router → QQ add-on: dispatches
music_dl/source.py - Source router → Migu add-on: dispatches
music_dl/source.py - Source router → Xiami add-on: dispatches
music_dl/source.py - Baidu add-on → HTTP API client: requests via
music_dl/addons/baidu.py - Kugou add-on → HTTP API client: requests via
music_dl/addons/kugou.py - Netease add-on → HTTP API client: requests via
music_dl/addons/netease.py - QQ add-on → HTTP API client: requests via
music_dl/addons/qq.py - Migu add-on → HTTP API client: requests via
music_dl/addons/migu.py - Xiami add-on → HTTP API client: requests via
music_dl/addons/xiami.py - HTTP API client → Music websites: sends requests
music_dl/api.py - Command workflow → Song downloads: downloads selected
music_dl/__main__.py - Song downloads → Local files: writes audio and extras
music_dl/song.py - Command workflow → Playlist player: starts playback
music_dl/__main__.py - Playlist player → Local files: plays or deletes
music_dl/player.py - Song downloads → Runtime options: reads options
music_dl/song.py - HTTP API client → Runtime options: reads request settings
music_dl/api.py