### Install dependencies and environment Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Commands to install the package manager and set up the development environment. ```bash pip install uv ``` ```bash uv sync ``` -------------------------------- ### Start Web UI Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Launches the SpotDL web interface. ```bash spotdl web ``` -------------------------------- ### Install spotDL on Termux Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Automated installation script for Termux environments. ```bash curl -L https://raw.githubusercontent.com/spotDL/spotify-downloader/master/scripts/termux.sh | sh ``` -------------------------------- ### Install FFmpeg System-wide Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Commands for installing FFmpeg on macOS and Linux. ```bash brew install ffmpeg ``` ```bash sudo apt install ffmpeg ``` -------------------------------- ### Install Dependencies via spotDL Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Commands to download FFmpeg and Deno directly into the spotDL installation directory. ```bash spotdl --download-ffmpeg ``` ```bash spotdl --download-deno ``` -------------------------------- ### Install and Update spotDL via pip Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Standard installation method for Python environments. ```bash pip install spotdl ``` ```bash pip install --upgrade spotdl ``` -------------------------------- ### Install dependencies Source: https://github.com/spotdl/spotify-downloader/blob/master/tests/README.md Install the required Python dependencies using pip and uv. ```shell pip install uv uv sync ``` -------------------------------- ### Install Missing Dependencies Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md Command to install missing packages required by yt-dlp. ```bash pip install brotli websockets yt-dlp -U ``` -------------------------------- ### Install spotDL via pip Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/installation.md Use this command to install the spotDL package. On non-Windows systems, use pip3 instead. ```shell pip install spotdl ``` -------------------------------- ### Install FFmpeg on Linux Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/index.md Command to install FFmpeg system-wide on Debian-based Linux distributions. ```bash sudo apt install ffmpeg ``` -------------------------------- ### Install FFmpeg on macOS Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/index.md Command to install FFmpeg system-wide on macOS using Homebrew. ```bash brew install ffmpeg ``` -------------------------------- ### Download FFmpeg for spotDL Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/installation.md Downloads FFmpeg directly to the spotDL installation directory for local use. ```shell spotdl --download-ffmpeg ``` -------------------------------- ### Demonstrate docstring inheritance Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Example showing how docstrings are inherited by subclasses when not explicitly defined. ```python class A: def test(self): """Docstring for A.""" pass class B(A): def test(self): pass ``` -------------------------------- ### Define module docstring format Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Standard template for documenting module or package purpose and usage examples. ```text At most 3 lines about module/package purpose Optional usage example for module/package, preferably showcasing most commonly used functionality ``` -------------------------------- ### Run type-checking with mypy Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Commands to install type stubs and perform static type analysis. ```bash mypy --ignore-missing-imports --follow-imports silent --install-types --non-interactive ./spotdl ``` ```bash mypy ./spotdl ``` -------------------------------- ### Get song URLs operation Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Retrieves user-friendly URLs for songs based on the provided query. ```sh spotdl url [query] ``` -------------------------------- ### Build spotDL from Source Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Steps to clone the repository and build an executable using uv. ```bash git clone https://github.com/spotDL/spotify-downloader && cd spotify-downloader pip install uv uv sync uv run scripts/build.py ``` -------------------------------- ### Generate and serve documentation with mkdocs Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Commands to build the documentation locally or run a live development server. ```bash mkdocs build --strict ``` ```bash mkdocs serve ``` -------------------------------- ### Initialize Synchronization Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Creates a sync file for a specific playlist or album. The filename must end with .spotdl. ```bash spotdl sync [query] --save-file [fileName] ``` ```bash spotdl sync https://open.spotify.com/playlist/37i9dQZF1E8UXBoz02kGID --save-file "the-weeknd.sync.spotdl" ``` -------------------------------- ### Display help options Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Command to list all available options for SpotDL. ```sh spotdl -h ``` -------------------------------- ### Build and Run spotDL with Docker Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Commands for building the Docker image and running the container with volume mapping. ```bash docker build -t spotdl . ``` ```bash docker run --rm -v $(pwd):/music spotdl download [trackUrl] ``` -------------------------------- ### Run SpotDL via CLI Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/index.md Basic command-line execution patterns for downloading songs using Spotify URLs. ```sh spotdl [urls] ``` ```sh python -m spotdl [urls] ``` ```sh spotdl [operation] [options] QUERY ``` ```sh spotdl -h ``` -------------------------------- ### Run spotDL with uv Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Alternative method to execute commands without manual activation. ```bash uv run spotdl -h ``` -------------------------------- ### Clone the repository Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Initial steps to fork and clone the project locally. ```bash git clone [your username]/spotify-downloader cd spotify-downloader ``` -------------------------------- ### Download Deno for spotDL Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md Command to download the Deno runtime required for specific YouTube downloads. ```bash spotdl --download-deno ``` -------------------------------- ### Create Docker container Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/installation.md Initialize a persistent Docker container with a volume mount for music storage. ```bash docker create \ --name=spotdl \ -v :/music \ spotdl/spotify-downloader ``` -------------------------------- ### Run SpotDL via CLI Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Basic command to execute SpotDL using URLs. ```sh spotdl [urls] ``` -------------------------------- ### Run SpotDL as a Python package Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Alternative execution method if the script path is not configured correctly. ```sh python -m spotdl [urls] ``` -------------------------------- ### Run CLI executable Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/installation.md Execute the spotDL binary from the terminal using the specified version and arguments. ```bash ./spotdl-vX.X.X operation [urls] ``` -------------------------------- ### Manage spotDL with Docker Compose Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/index.md Commands for building, running, and extracting files using Docker Compose with user ID mapping. ```bash export PUID=$(id -u) export PGID=$(id -g) # Build and download docker compose build docker compose run --rm spotdl download [trackUrl] ``` ```bash docker compose up --no-start spotdl mkdir -p downloads docker compose cp spotdl:/music/. ./downloads/ ``` -------------------------------- ### Build and run local Docker image Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/installation.md Commands to build the image locally and execute download tasks with volume mounting. ```bash docker build -t spotdl . ``` ```bash docker run --rm spotdl --help ``` ```bash docker run --rm -v $(pwd):/music spotdl download https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b ``` -------------------------------- ### Run Docker Hub image Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/installation.md Commands to pull and run the official spotDL image from Docker Hub. ```bash docker pull spotdl/spotify-downloader ``` ```bash docker run --rm -v $(pwd):/music spotdl/spotify-downloader download https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b ``` -------------------------------- ### Generate configuration file Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Creates a new configuration file. Note that this action will overwrite any existing configuration. ```bash spotdl --generate-config ``` -------------------------------- ### Execute tests Source: https://github.com/spotdl/spotify-downloader/blob/master/tests/README.md Run the test suite from the project root directory. ```shell pytest ``` -------------------------------- ### Activate virtual environment Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Platform-specific commands to activate the virtual environment. ```bash source .venv/bin/activate ``` ```console .venv\Scripts\activate ``` -------------------------------- ### Default configuration structure Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md The full schema of the default configuration file containing all available settings. ```json { "client_id": "f8a606e5583643beaa27ce62c48e3fc1", "client_secret": "f6f4c8f73f0649939286cf417c811607", "auth_token": null, "user_auth": false, "headless": false, "cache_path": "/Users/username/.spotdl/.spotipy", "no_cache": false, "max_retries": 3, "use_cache_file": false, "use_official_api": false, "audio_providers": [ "youtube-music" ], "lyrics_providers": [ "genius", "azlyrics", "musixmatch" ], "playlist_numbering": false, "scan_for_songs": false, "m3u": null, "output": "{artists} - {title}.{output-ext}", "overwrite": "skip", "search_query": null, "ffmpeg": "ffmpeg", "bitrate": "128k", "ffmpeg_args": null, "format": "mp3", "save_file": null, "filter_results": true, "album_type": null, "threads": 4, "cookie_file": null, "restrict": null, "print_errors": false, "sponsor_block": false, "preload": false, "archive": null, "load_config": true, "log_level": "INFO", "simple_tui": false, "fetch_albums": false, "id3_separator": "/", "ytm_data": false, "add_unavailable": false, "generate_lrc": false, "force_update_metadata": false, "only_verified_results": false, "sync_without_deleting": false, "max_filename_length": null, "yt_dlp_args": null, "detect_formats": null, "save_errors": null, "ignore_albums": null, "proxy": null, "skip_explicit": false, "log_format": null, "redownload": false, "skip_album_art": false, "create_skip_file": false, "respect_skip_file": false, "web_use_output_dir": false, "port": 8800, "host": "localhost", "keep_alive": false, "enable_tls": false, "key_file": null, "cert_file": null, "ca_file": null, "allowed_origins": null, "keep_sessions": false } ``` -------------------------------- ### Download Songs from a List File Source: https://github.com/spotdl/spotify-downloader/wiki/Instructions-for-Downloading-Songs Create a text file (e.g., list.txt) with Spotify links or song names, one per line. Pass the file path to the --list option to download all specified tracks. The script removes downloaded tracks from the list, allowing for interrupted downloads to resume. ```text https://open.spotify.com/track/2lfPecqFbH8X4lHSpTxt8l elektromania sky high https://open.spotify.com/track/0fbspWuEdaaT9vfmbAZr1C ``` ```bash $ spotdl --list=/path/to/list.txt ``` -------------------------------- ### Run linting with pylint Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Execute pylint to check code quality. ```bash pylint --fail-under 10 --limit-inference-results 0 --disable=R0917 ./spotdl ``` -------------------------------- ### Search and download Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Search for a song by name and download it. Quotation marks are required. ```bash spotdl download '[songQuery]' ``` ```bash spotdl download 'The Weeknd - Blinding Lights' ``` -------------------------------- ### Specify custom download directory Source: https://github.com/spotdl/spotify-downloader/wiki/FAQ Use the -f flag to define a target directory for downloads. If no naming scheme is provided, the tool defaults to a standard pattern. ```bash $ spotdl -s "ncs - spectre" -f "/home/user/Happy-Music/" ``` ```bash $ spotdl -s "ncs - spectre" -f "/home/user/Happy-Music/{artist} - {track-name}.{output-ext}" ``` -------------------------------- ### Download Songs from a Spotify Playlist Source: https://github.com/spotdl/spotify-downloader/wiki/Instructions-for-Downloading-Songs Use the --playlist option with a Spotify playlist URL to download all tracks. The script will create a .txt file with the playlist name containing all tracks, which can then be used with the --list option. ```bash $ spotdl --playlist https://open.spotify.com/user/nocopyrightsounds/playlist/7sZbq8QGyMnhKPcLJvCUFD ``` ```bash spotdl --list=.txt ``` -------------------------------- ### Run tests with real network Source: https://github.com/spotdl/spotify-downloader/blob/master/tests/README.md Execute the test suite without using mocked network responses. ```shell pytest --disable-vcr ``` -------------------------------- ### General SpotDL command syntax Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Standard structure for executing operations with specific options and queries. ```sh spotdl [operation] [options] QUERY ``` -------------------------------- ### Run Docker Compose commands Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/installation.md Commands to build, execute downloads, and extract files from Docker Compose volumes. ```bash docker compose build ``` ```bash docker compose run --rm spotdl download https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b ``` ```bash docker compose up --no-start spotdl mkdir -p downloads docker compose cp spotdl:/music/. ./downloads/ ``` -------------------------------- ### Download Song by Name Source: https://github.com/spotdl/spotify-downloader/wiki/Instructions-for-Downloading-Songs Use this command to download a specific song by its name. The script finds the best match and downloads it to the 'Music/' folder, converting it to MP3 and attempting to fix metadata and album art using Spotify. ```bash $ spotdl --song "alan walker fade" ``` ```bash $ spotdl --song "alan walker fade" "tobu candyland" ``` -------------------------------- ### Download a playlist Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Download an entire playlist using its Spotify URL. ```bash spotdl download [playlistUrl] ``` ```bash spotdl download https://open.spotify.com/playlist/37i9dQZF1E8UXBoz02kGID ``` -------------------------------- ### Download YouTube link with Spotify metadata Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Download a YouTube video and apply metadata from a Spotify track. Quotes are required. ```bash spotdl download "YouTubeURL|SpotifyURL" ``` ```bash spotdl download "https://www.youtube.com/watch?v=XXYlFuWEuKI|https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b?si=b5c0790edc8f4904" ``` -------------------------------- ### Download Public Playlists by Username Source: https://github.com/spotdl/spotify-downloader/wiki/Instructions-for-Downloading-Songs Use the -u option with a Spotify username to list and select public playlists for download. The selected playlist's tracks will be saved to a .txt file for subsequent download via the --list option. ```bash $ spotdl -u ``` ```bash $ spotdl --list=.txt ``` -------------------------------- ### Queue multiple download tasks Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Download multiple items by separating arguments with spaces. ```bash spotdl download [songQuery1] [albumUrl] [songQuery2] ... (order does not matter) ``` ```bash spotdl download 'The Weeknd - Blinding Lights' https://open.spotify.com/playlist/37i9dQZF1E8UXBoz02kGID ... ``` -------------------------------- ### Reinstall spotdl via pip Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md Use this command to force a clean reinstall of the latest version of spotdl. ```bash pip install -U --force spotdl ``` -------------------------------- ### Sort imports with isort Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Check and verify import sorting. ```bash isort --check --diff ./spotdl ``` -------------------------------- ### CLI Usage: spotdl Source: https://github.com/spotdl/spotify-downloader/wiki/Available-options The primary command for interacting with the spotdl downloader. It supports various input sources like songs, playlists, albums, and user libraries. ```APIDOC ## CLI Command: spotdl ### Description Download and convert tracks from Spotify, YouTube, etc. using various input sources and configuration flags. ### Parameters #### Input Options (Choose one) - **-s, --song** (string) - Optional - Download track(s) by Spotify link or name. - **-l, --list** (string) - Optional - Download tracks from a file. - **-p, --playlist** (string) - Optional - Load tracks from playlist URL. - **-a, --album** (string) - Optional - Load tracks from album URL. - **-aa, --all-albums** (string) - Optional - Load all tracks from artist URL. - **-u, --username** (string) - Optional - Load tracks from user's playlist. #### Configuration Options - **-o, --output-ext** (string) - Optional - Preferred output format (m4a, mp3, flac). - **-q, --quality** (string) - Optional - Preferred audio quality (worst, best). - **-f, --output-file** (string) - Optional - Path where to write the downloaded track. - **-m, --manual** (boolean) - Optional - Choose the track to download manually. - **-nm, --no-metadata** (boolean) - Optional - Do not embed metadata in tracks. - **--trim-silence** (boolean) - Optional - Remove silence from the start of the audio. ### Request Example spotdl --song "https://open.spotify.com/track/example" --output-ext mp3 --quality best ``` -------------------------------- ### Download All Tracks from Artist Albums Source: https://github.com/spotdl/spotify-downloader/wiki/Instructions-for-Downloading-Songs Use the --all-albums option with a Spotify artist URL to download all tracks from the artist's available albums. This generates an artist-named .txt file for batch downloading using the --list option. ```bash $ spotdl --all-albums https://open.spotify.com/artist/1feoGrmmD8QmNqtK2Gdwy8 ``` ```bash $ spotdl --list=.txt ``` -------------------------------- ### Download all user playlists Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Download all playlists associated with the user account. Requires --user-auth. ```bash spotdl download all-user-playlists --user-auth ``` -------------------------------- ### Download Songs from a Spotify Album Source: https://github.com/spotdl/spotify-downloader/wiki/Instructions-for-Downloading-Songs Use the --album option with a Spotify album URL to download all tracks from the album. Similar to playlists, this creates an album-named .txt file for use with the --list option. ```bash $ spotdl --album https://open.spotify.com/album/499J8bIsEnU7DSrosFDJJg ``` ```bash $ spotdl --list=.txt ``` -------------------------------- ### Sync directory operation Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Commands for creating and using sync files to manage directory state. ```sh spotdl sync [query] --save-file {filename}.spotdl ``` ```sh spotdl sync {filename}.spotdl ``` -------------------------------- ### Check code coverage Source: https://github.com/spotdl/spotify-downloader/blob/master/tests/README.md Run tests and generate a code coverage report for the spotdl package. ```shell pytest --cov=spotdl ``` -------------------------------- ### Download Song by Spotify Link Source: https://github.com/spotdl/spotify-downloader/wiki/Instructions-for-Downloading-Songs Recommended for full metadata support. Provide the Spotify HTTP link to download a specific track. This method guarantees the correct metadata and album art. ```bash $ spotdl --song https://open.spotify.com/track/2lfPecqFbH8X4lHSpTxt8l ``` -------------------------------- ### Download all user saved albums Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Download all albums saved to the user's library. Requires --user-auth. ```bash spotdl download all-user-saved-albums --user-auth ``` -------------------------------- ### Configure Docker Compose environment Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/installation.md Set environment variables for user and group IDs to manage file permissions correctly. ```bash export PUID=$(id -u) export PGID=$(id -g) ``` -------------------------------- ### Syncing Songs Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Updates local files based on the sync file. Use --sync-without-deleting to keep files removed from the source. ```bash spotdl sync [fileName] ``` ```bash spotdl sync "the-weeknd.sync.spotdl" ``` ```bash spotdl sync "the-weeknd.sync.spotdl" --sync-without-deleting ``` -------------------------------- ### Download an artist's songs Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Download all songs from a specific artist using their Spotify URL. ```bash spotdl download [artistUrl] ``` ```bash spotdl download https://open.spotify.com/artist/1Xyo4u8uXC1ZmMpatF05PJ ``` -------------------------------- ### Define class docstring format Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Standard template for documenting class purpose, attributes, and notes. ```text one-liner about class purpose ### Attributes - attribute: description ### Notes (optional) - notes if any ``` -------------------------------- ### Format code with black Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Apply black formatting to the codebase. ```bash black ./spotdl ``` -------------------------------- ### Native Module Load Error Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md Error message indicating a failure to load native modules on M1 Macs. ```text aise OSError("Cannot load native module '%s': %s" % (name, ", ".join(attempts))) OSError: Cannot load native module 'Cryptodome.Cipher._raw_ecb': Not found '_raw_ecb.cpython-39-darwin.so', Cannot load '_raw_ecb.abi3.so': dlopen(/opt/homebrew/lib/python3.9/site-packages/Cryptodome/Util/../Cipher/_raw_ecb.abi3.so, 6): no suitable image found. Did find: /opt/homebrew/lib/python3.9/site-packages/Cryptodome/Util/../Cipher/_raw_ecb.abi3.so: mach-o, but wrong architecture /opt/homebrew/lib/python3.9/site-packages/Cryptodome/Cipher/_raw_ecb.abi3.so: mach-o, but wrong architecture, Not found '_raw_ecb.so' ``` -------------------------------- ### Open PowerShell in Windows Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/installation.md Keyboard shortcut sequence to open a terminal window in the current directory. ```text SHIFT + RIGHT CLICK ``` -------------------------------- ### Configure PATH for Unix-like Systems Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md Commands to add the local binary directory to the PATH environment variable for bash and zsh shells. ```bash export PATH=~/.local/bin:$PATH ``` ```bash source ~/.bashrc ``` ```bash source ~/.zshrc ``` -------------------------------- ### Define function docstring format Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/CONTRIBUTING.md Standard template for documenting function purpose, arguments, return values, errors, and notes. ```text one-liner about function's purpose ### Args (optional) - arg_name: description ### Returns (optional) - return value description ### Errors (only if there are known unhandled Errors/thrown Errors) - known errors ### Notes (optional) - notes if any ``` -------------------------------- ### Command Not Recognized Error Message Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md The error message displayed when the spotdl executable is not found in the system PATH. ```text 'spotdl' is not recognized as an internal or external command, operable program or batch file. ``` -------------------------------- ### Skip existing tracks Source: https://github.com/spotdl/spotify-downloader/wiki/FAQ Configure the tool to automatically skip files that already exist in the destination folder using the --overwrite flag. ```bash $ spotdl -l=/home/user/my_fav_tracks.txt --overwrite skip ``` -------------------------------- ### Saving Metadata Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Saves song metadata to a file for later use, with an optional preload flag to speed up downloads. ```bash spotdl save [query] --save-file [fileName] ``` ```bash spotdl save 'The Weeknd - Blinding Lights' --save-file 'the-weeknd.spotdl' ``` ```bash spotdl save [query] --save-file [fileName] --preload ``` ```bash spotdl save 'The Weeknd - Blinding Lights' --save-file 'the-weeknd.spotdl' --preload ``` -------------------------------- ### Download liked songs Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Download all songs from the user's liked library. Requires --user-auth. ```bash spotdl download saved --user-auth ``` -------------------------------- ### Download Song by YouTube Link Source: https://github.com/spotdl/spotify-downloader/wiki/Instructions-for-Downloading-Songs Use the -s option with a YouTube URL or video ID to download a specific song. This method downloads the audio from the provided YouTube link. ```bash $ spotdl -s https://www.youtube.com/watch?v=lc4Tt-CU-i0 ``` -------------------------------- ### Upgrade SSL certificates Source: https://github.com/spotdl/spotify-downloader/wiki/FAQ Upgrade the certifi package to resolve SSL certificate verification errors. ```bash $ pip3 install --upgrade certifi ``` -------------------------------- ### RuntimeWarning Message Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md Warning message encountered when running spotdl via the python module flag. ```text RuntimeWarning: 'spotdl.__main__' found in sys.modules after import of package 'spotdl', but prior to execution of 'spotdl.__main__'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) ``` -------------------------------- ### Missing Dependency Error Message Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md The error message indicating that required packages for yt-dlp are missing. ```text pkg_resources.DistributionNotFound: The 'websockets' distribution was not found and is required by yt-dlp ``` -------------------------------- ### Update youtube-dl Source: https://github.com/spotdl/spotify-downloader/wiki/FAQ Update the youtube-dl package via pip to resolve common download errors. ```bash $ pip3 install youtube-dl -U ``` -------------------------------- ### Update spotdl Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md Commands to update spotdl to the latest version to resolve various errors. ```bash pip install -U spotdl ``` ```bash pip install spotdl -U ``` -------------------------------- ### Disable automatic configuration loading Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/usage.md Set this option in the configuration file to prevent automatic loading of settings. ```json { "load_config": false } ``` -------------------------------- ### Save metadata operation Source: https://github.com/spotdl/spotify-downloader/blob/master/README.md Saves song metadata to a file without downloading audio. ```sh spotdl save [query] --save-file {filename}.spotdl ``` -------------------------------- ### YouTube Music API KeyError Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md Error message related to changes in the YouTube Music API response structure. ```text KeyError: "Unable to find 'header' using path ['header', 'musicCardShelfHeaderBasicRenderer', 'title', 'runs', 0, 'text']" ``` -------------------------------- ### Update ytmusicapi Source: https://github.com/spotdl/spotify-downloader/blob/master/docs/troubleshooting.md Command to update the ytmusicapi package to resolve API compatibility issues. ```bash pip install -U ytmusicapi ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.