Skip to content

Commit

Permalink
v4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xnetcat authored Jul 11, 2023
2 parents 1924fbe + 00c56b2 commit 520c8c2
Show file tree
Hide file tree
Showing 30 changed files with 15,029 additions and 31,117 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
.github
.vscode
docs
scripts
tests
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry
run: pipx install poetry==1.3.2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Refer to our [Installation Guide](https://spotdl.rtfd.io/en/latest/installation/
git clone https://github.com/spotDL/spotify-downloader && cd spotify-downloader
pip install poetry
poetry install
python3 scripts/build.py
poetry run python3 scripts/build.py
```
An executable is created in `spotify-downloader/dist/`.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ spotDL uses YouTube as a source for music downloads. This method is used to avoi
spotDL downloads music from YouTube and is designed to always download the highest possible bitrate; which is 128 kbps for regular users and 256 kbps for YouTube Music premium users.
Check the [Audio Formats](USAGE#audio-formats-and-quality) page for more info.
Check the [Audio Formats](usage#audio-formats-and-quality) page for more info.
## Contributing
Expand Down
75 changes: 52 additions & 23 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,22 @@
spotdl download "https://www.youtube.com/watch?v=XXYlFuWEuKI|https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b?si=b5c0790edc8f4904"
```

??? info "Liked songs"
To download liked Spotify songs run
> `--user-auth` is required

```bash
spotdl download saved --user-auth
```

??? info "All user playlists"
To download all user playlists run
> `--user-auth` is required

```bash
spotdl download all-user-playlists --user-auth
```

You can queue up multiple download tasks by separating the arguments with spaces

```bash
Expand Down Expand Up @@ -112,7 +128,7 @@ YouTube Music Premium users can use their account to download songs with a highe
To download music in higher quality follow the steps below:

1. Get cookies.txt for https://music.youtube.com.
> You can use [Get cookies.txt extension](https://chrome.google.com/webstore/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc) for this.
> You can use [Get cookies.txt extension](https://chrome.google.com/webstore/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc) or [cookies.txt](https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/) for this. More info [here](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp)
2. Add `--cookie-file cookies.txt` option to your spotDL command line options
> Replace cookies.txt with the actual name of your cookies file
Expand Down Expand Up @@ -262,7 +278,7 @@ If you don't want config to load automatically change `load_config` option in co
"filter_results": true,
"threads": 4,
"cookie_file": null,
"restrict": false,
"restrict": null,
"print_errors": false,
"sponsor_block": false,
"preload": false,
Expand Down Expand Up @@ -332,20 +348,26 @@ Main options:
url: Get the download URL for songs
query Spotify/YouTube URL for a song/playlist/album/artist/etc. to download.
For album searching, include 'album:' and optional 'artist:' tags
(ie. 'album:the album name' or 'artist:the artist album: the album').
For album/playlist/artist searching, include 'album:', 'playlist:', 'artist:'
(ie. 'album:the album name' you can mix these options to get more accurate results).
To download liked songs use 'saved' as the query, or to download all user playlists
use 'all-user-playlists'.
For manual audio matching, you can use the format 'YouTubeURL|SpotifyURL'
You can only use album/playlist/tracks urls when downloading/matching youtube urls.
When using youtube url without spotify url, you won't be able to use `--fetch-albums` option.
--audio [{youtube,youtube-music,slider-kz} ...]
--audio [{youtube,youtube-music,slider-kz,soundcloud,bandcamp,piped} ...]
The audio provider to use. You can provide more than one for fallback.
--lyrics [{genius,musixmatch,azlyrics,synced} ...]
The lyrics provider to use. You can provide more than one for fallback. Synced lyrics might not work correctly with some music players. For such cases it's better to use `--generate-lrc` option.
The lyrics provider to use. You can provide more than one for fallback. Synced lyrics might not work correctly with some music players. For such cases it's better to use
`--generate-lrc` option.
--config Use the config file to download songs. It's located under C:\Users\user\.spotdl\config.json or ~/.spotdl/config.json under linux
--search-query SEARCH_QUERY
The search query to use, available variables: {title}, {artists}, {artist}, {album}, {album-artist}, {genre}, {disc-number}, {disc-count}, {duration}, {year}, {original-date}, {track-number},
{tracks-count}, {isrc}, {track-id}, {publisher}, {list-length}, {list-position}, {list-name}, {output-ext}
The search query to use, available variables: {title}, {artists}, {artist}, {album}, {album-artist}, {genre}, {disc-number}, {disc-count}, {duration}, {year}, {original-
date}, {track-number}, {tracks-count}, {isrc}, {track-id}, {publisher}, {list-length}, {list-position}, {list-name}, {output-ext}
--dont-filter-results
Disable filtering results.
--only-verified-results
Expand All @@ -365,39 +387,42 @@ Spotify options:
--max-retries MAX_RETRIES
The maximum number of retries to perform when getting metadata.
--headless Run in headless mode.
--use-cache-file Use the cache file to get metadata. It's located under C:\Users\user\.spotdl\.spotify_cache or ~/.spotdl/.spotify_cache under linux. It only caches tracks and gets updated whenever spotDL gets
metadata from Spotify. (It may provide outdated metadata use with caution)
--use-cache-file Use the cache file to get metadata. It's located under C:\Users\user\.spotdl\.spotify_cache or ~/.spotdl/.spotify_cache under linux. It only caches tracks and gets updated
whenever spotDL gets metadata from Spotify. (It may provide outdated metadata use with caution)
FFmpeg options:
--ffmpeg FFMPEG The ffmpeg executable to use.
--threads THREADS The number of threads to use when downloading songs.
--bitrate {auto,disable,8k,16k,24k,32k,40k,48k,64k,80k,96k,112k,128k,160k,192k,224k,256k,320k,0,1,2,3,4,5,6,7,8,9}
The constant/variable bitrate to use for the output file. Values from 0 to 9 are variable bitrates. Auto will use the bitrate of the original file. Disable will disable the bitrate option. (In case
of m4a and opus files, auto and disable will skip the conversion)
The constant/variable bitrate to use for the output file. Values from 0 to 9 are variable bitrates. Auto will use the bitrate of the original file. Disable will disable
the bitrate option. (In case of m4a and opus files, auto and disable will skip the conversion)
--ffmpeg-args FFMPEG_ARGS
Additional ffmpeg arguments passed as a string.
Output options:
--format {mp3,flac,ogg,opus,m4a}
--format {mp3,flac,ogg,opus,m4a,wav}
The format to download the song in.
--save-file SAVE_FILE
The file to save/load the songs data from/to. It has to end with .spotdl. If combined with the download operation, it will save the songs data to the file. Required for save/preload/sync
The file to save/load the songs data from/to. It has to end with .spotdl. If combined with the download operation, it will save the songs data to the file. Required for
save/preload/sync
--preload Preload the download url to speed up the download process.
--output OUTPUT Specify the downloaded file name format, available variables: {title}, {artists}, {artist}, {album}, {album-artist}, {genre}, {disc-number}, {disc-count}, {duration}, {year}, {original-date}, {track-
number}, {tracks-count}, {isrc}, {track-id}, {publisher}, {list-length}, {list-position}, {list-name}, {output-ext}
--m3u [M3U] Name of the m3u file to save the songs to. Defaults to {list[0]}.m3u8 If you want to generate a m3u for each list in the query use {list}, If you want to generate a m3u file based on the first list
in the query use {list[0]}, (0 is the first list in the query, 1 is the second, etc. songs don't count towards the list number)
--output OUTPUT Specify the downloaded file name format, available variables: {title}, {artists}, {artist}, {album}, {album-artist}, {genre}, {disc-number}, {disc-count}, {duration},
{year}, {original-date}, {track-number}, {tracks-count}, {isrc}, {track-id}, {publisher}, {list-length}, {list-position}, {list-name}, {output-ext}
--m3u [M3U] Name of the m3u file to save the songs to. Defaults to {list[0]}.m3u8 If you want to generate a m3u for each list in the query use {list}, If you want to generate a m3u
file based on the first list in the query use {list[0]}, (0 is the first list in the query, 1 is the second, etc. songs don't count towards the list number)
--cookie-file COOKIE_FILE
Path to cookies file.
--overwrite {metadata,skip,force}
How to handle existing/duplicate files. (When combined with --scan-for-songs force will remove all duplicates, and metadata will only apply metadata to the latest song and will remove the rest. )
--restrict Restrict filenames to ASCII only
--overwrite {force,skip,metadata}
How to handle existing/duplicate files. (When combined with --scan-for-songs force will remove all duplicates, and metadata will only apply metadata to the latest song and
will remove the rest. )
--restrict [{strict,ascii,none}]
Restrict filenames to a sanitized set of characters for better compatibility
--print-errors Print errors (wrong songs, failed downloads etc) on exit, useful for long playlist
--sponsor-block Use the sponsor block to download songs from yt/ytm.
--archive ARCHIVE Specify the file name for an archive of already downloaded songs
--playlist-numbering Sets each track in a playlist to have the playlist's name as its album, and album art as the playlist's icon
--scan-for-songs Scan the output directory for existing files. This option should be combined with the --overwrite option to control how existing files are handled. (Output directory is the last directory that is not
a template variable in the output template)
--scan-for-songs Scan the output directory for existing files. This option should be combined with the --overwrite option to control how existing files are handled. (Output directory is
the last directory that is not a template variable in the output template)
--fetch-albums Fetch all albums from songs in query
--id3-separator ID3_SEPARATOR
Change the separator used in the id3 tags. Only supported for mp3 files.
Expand All @@ -410,6 +435,10 @@ Output options:
Sync without deleting songs that are not in the query.
--max-filename-length MAX_FILENAME_LENGTH
Max file name length. (This won't override the max file name length enforced by the OS)
--yt-dlp-args YT_DLP_ARGS
Arguments to pass to yt-dlp
--detect-formats [{mp3,flac,ogg,opus,m4a,wav} ...]
Detect already downloaded songs with file format different from the --format option
Web options:
--host HOST The host to use for the web server.
Expand Down
Loading

0 comments on commit 520c8c2

Please sign in to comment.