diff --git a/README.md b/README.md index 9c1327f..78782a3 100644 --- a/README.md +++ b/README.md @@ -2,32 +2,32 @@ A batch downloader for Soulseek using Soulseek.NET. Accepts CSV files and Spotify or YouTube urls. -##### Download tracks from a csv file: +#### Download tracks from a csv file: ``` slsk-batchdl -i test.csv ``` Use `--print tracks` before downloading to check if everything has been parsed correctly. The names of the columns should be: `Artist`, `Title`, `Album`, `Length`. Only the title column is required, but any additional info improves search. -##### Download spotify likes while skipping existing songs and creating an m3u file: +#### Download spotify likes while skipping existing songs: ``` -slsk-batchdl -i spotify-likes --m3u --skip-existing +slsk-batchdl -i spotify-likes --skip-existing ``` -You might need to provide an id and secret when using spotify (e.g when downloading a private playlist), which you can get here https://developer.spotify.com/dashboard/applications. Create an app, then select it and add `http://localhost:48721/callback` as a redirect url in the settings. +To download private playlists or liked songs you will need to provide a client id and secret, which you can get here https://developer.spotify.com/dashboard/applications. Create an app and add `http://localhost:48721/callback` as a redirect url in its settings. -##### Download the first 10 songs of a youtube playlist: +#### Download youtube playlist (with fallback to yt-dlp), including deleted videos: ``` -slsk-batchdl -n 10 -i "https://www.youtube.com/playlist?list=PLI_eFW8NAFzYAXZ5DrU6E6mQ_XfhaLBUX" +slsk-batchdl --get-deleted --yt-dlp -i "https://www.youtube.com/playlist?list=PLI_eFW8NAFzYAXZ5DrU6E6mQ_XfhaLBUX" ``` -To include unavailable videos, you will need to provide an api key with `--youtube-key`. Get it here https://console.cloud.google.com. Create a new project, click "Enable Api" and search for "youtube data", then follow the prompts. +Playlists are retrieved using the YoutubeExplode library which unfortunately doesn't always return all videos. You can use the official API by providing a key with `--youtube-key`. Get it here https://console.cloud.google.com. Create a new project, click "Enable Api" and search for "youtube data", then follow the prompts. -##### Search & download a specific song, preferring high quality: +#### Search & download a specific song: ``` slsk-batchdl -i "title=MC MENTAL @ HIS BEST,length=242" --pref-format "flac,wav" ``` -##### Find an artist's songs which aren't in your library: +#### Find an artist's songs which aren't in your library: ``` -slsk-batchdl -i "artist=MC MENTAL" -a --print tracks --skip-existing --music-dir "path\to\music" +slsk-batchdl -i "artist=MC MENTAL" --aggregate --print tracks --skip-existing --music-dir "path\to\music" ``` ### Options: @@ -48,47 +48,43 @@ Usage: slsk-batchdl -i [OPTIONS] Title, Album, Length. Only the title column is required, but any extra info improves search results. - String for the track, album, or artist to search for: - Can either be any typical search text like "Artist - Title" - or a comma-separated list like "title=Song,artist=Artist" - Available fields: title, artist, album, length (in seconds). + Name of the track, album, or artist to search for: + Can either be any typical search string or a comma-separated + list like "title=Song Name,artist=Artist Name,length=215" + Allowed properties are: title, artist, album, length (sec) Options: --user Soulseek username --pass Soulseek password - --spotify Input is a spotify url (override automatic parsing) - --spotify-id spotify client ID (required for private playlists) - --spotify-secret spotify client secret (required for private playlists) + --spotify-id spotify client ID + --spotify-secret spotify client secret - --youtube Input is a youtube url (override automatic parsing) --youtube-key Youtube data API key + --get-deleted Attempt to retrieve titles of deleted videos from wayback + machine. Requires yt-dlp. - --csv Input is a path to a local CSV (override automatic parsing) --time-format Time format in Length column of the csv file (e.g h:m:s.ms - for durations like 1:04:35.123). Default: s (seconds) + for durations like 1:04:35.123). Default: s --yt-parse Enable if the csv file contains YouTube video titles and - channel names; attempt to parse them into proper title and - artist. If the the csv contains an "ID", "URL", or - "Description" column then those will be used for parsing as - well. + channel names; attempt to parse them into title and artist + names. - --string Input is a search string (override automatic parsing) - -a --aggregate Instead of downloading a single track matching the search - string, find and download all distinct songs associated with - the provided artist, album, or track title. Search string must - be a list of properties. - --min-users-aggregate Minimum number of users sharing a track before it is - downloaded in aggregate mode. Setting it to 2 or more will - significantly reduce false positives, but may introduce false - negatives. Default: 1 + -a --aggregate When input is a string: Instead of downloading a single + track matching the search string, find and download all + distinct songs associated with the provided artist, album, + or track title. Input string must be a list of properties. + --min-users-aggregate Minimum number of users sharing a track before it is + downloaded in aggregate mode. Setting it to higher values + will significantly reduce false positives, but may introduce + false negatives. Default: 2 - -p --path Where to place downloaded files - -f --folder Subfolder name + -p --path Download folder + -f --folder Subfolder name (default: playlist/csv name) -n --number Download the first n tracks of a playlist -o --offset Skip a specified number of tracks --reverse Download tracks in reverse order - --remove-from-playlist Remove downloaded tracks from playlist (spotify only) + --remove-from-playlist Remove downloaded tracks from playlist (for spotify only) --name-format Name format for downloaded tracks, e.g "{artist} - {title}" --m3u Create an m3u8 playlist file @@ -102,54 +98,50 @@ Options: --banned-users Comma-separated list of users to ignore --danger-words Comma-separated list of words that must appear in either both search result and track title or in neither of the - two. Case-insensitive. (default:"mix, edit, dj, cover") + two. Case-insensitive. (default:"remix, edit,cover") --pref-format Preferred file format(s), comma-separated (default: mp3) - --pref-length-tol Preferred length tolerance in seconds (default: 3) + --pref-length-tol Preferred length tolerance in seconds (default: 2) --pref-min-bitrate Preferred minimum bitrate (default: 200) --pref-max-bitrate Preferred maximum bitrate (default: 2200) --pref-max-samplerate Preferred maximum sample rate (default: 96000) - --pref-strict-title Prefer download if filename contains track title --pref-strict-artist Prefer download if filepath contains track artist --pref-banned-users Comma-separated list of users to deprioritize --pref-danger-words Comma-separated list of words that should appear in either both search result and track title or in neither of the - two. + two. (default: see github) -s --skip-existing Skip if a track matching file conditions is found in the output folder or your music library (if provided) - --skip-mode Sets the way the program checks if a track exists - name: Use only filenames + --skip-mode name: Use only filenames to check if a track exists name-precise (default): Use filenames and check conditions tag: Use file tags (slower) tag-precise: Use file tags and check file conditions --music-dir Specify to skip downloading tracks found in a music library - use with --skip-existing + Use with --skip-existing --skip-not-found Skip searching for tracks that weren't found on Soulseek during the last run. --remove-ft Remove "ft." or "feat." and everything after from the - track names before searching. - --remove-brackets Remove text in square brackets from track names before - searching. + track names before searching + --remove-regex Remove a regex from all track names and artist names --no-artist-search Perform a search without artist name if nothing was found. Only use for sources such as youtube or soundcloud where the "artist" could just be an uploader. --artist-search Also try to find track by searching for the artist only - --no-regex-search Perform an additional search without a regex pattern - --no-diacr-search Perform an additional search without diacritics - -d --desperate Equivalent to enabling all additional searches, slower. + --no-diacr-search Also perform a search without diacritics + --no-regex-search Also perform a search without a regex pattern --yt-dlp Use yt-dlp to download tracks that weren't found on Soulseek. yt-dlp must be available from the command line. --config Specify config file location --search-timeout Max search time in ms (default: 6000) --max-stale-time Max download time without progress in ms (default: 50000) - --concurrent-processes Max concurrent searches & downloads (default: 2) - --display