From 20d8310d20e46941abf525340310aae41313ceea Mon Sep 17 00:00:00 2001 From: fiso64 Date: Tue, 28 Nov 2023 14:31:42 +0100 Subject: [PATCH] stuff --- README.md | 37 +- slsk-batchdl/Program.cs | 1026 +++++++++++++++++++----------- slsk-batchdl/slsk-batchdl.csproj | 2 +- 3 files changed, 666 insertions(+), 399 deletions(-) diff --git a/README.md b/README.md index 78782a3..838c6da 100644 --- a/README.md +++ b/README.md @@ -4,37 +4,37 @@ A batch downloader for Soulseek using Soulseek.NET. Accepts CSV files and Spotif #### Download tracks from a csv file: ``` -slsk-batchdl -i test.csv +slsk-batchdl 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: ``` -slsk-batchdl -i spotify-likes --skip-existing +slsk-batchdl spotify-likes --skip-existing ``` 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 youtube playlist (with fallback to yt-dlp), including deleted videos: ``` -slsk-batchdl --get-deleted --yt-dlp -i "https://www.youtube.com/playlist?list=PLI_eFW8NAFzYAXZ5DrU6E6mQ_XfhaLBUX" +slsk-batchdl --get-deleted --yt-dlp "https://www.youtube.com/playlist?list=PLI_eFW8NAFzYAXZ5DrU6E6mQ_XfhaLBUX" ``` 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: ``` -slsk-batchdl -i "title=MC MENTAL @ HIS BEST,length=242" --pref-format "flac,wav" +slsk-batchdl "title=MC MENTAL @ HIS BEST,length=242" --pref-format "flac,wav" ``` #### Find an artist's songs which aren't in your library: ``` -slsk-batchdl -i "artist=MC MENTAL" --aggregate --print tracks --skip-existing --music-dir "path\to\music" +slsk-batchdl "artist=MC MENTAL" --aggregate --print tracks --skip-existing --music-dir "path\to\music" ``` ### Options: ``` -Usage: slsk-batchdl -i [OPTIONS] +Usage: slsk-batchdl [OPTIONS] - -i --input is one of the following: + is one of the following: Spotify playlist url or "spotify-likes": Download a spotify playlist or your liked songs. --spotify-id and @@ -84,12 +84,12 @@ Options: -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 (for spotify only) + --remove-from-playlist Remove downloaded tracks from playlist (spotify only) --name-format Name format for downloaded tracks, e.g "{artist} - {title}" --m3u Create an m3u8 playlist file --format Accepted file format(s), comma-separated - --length-tol Length tolerance in seconds (default: 3) + --length-tol Length tolerance in seconds (default: 3) --min-bitrate Minimum file bitrate --max-bitrate Maximum file bitrate --max-samplerate Maximum file sample rate @@ -100,7 +100,7 @@ Options: both search result and track title or in neither of the 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: 2) + --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) @@ -108,7 +108,7 @@ Options: --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. (default: see github) + two. (default: "mix,dj , edit,cover,(") -s --skip-existing Skip if a track matching file conditions is found in the output folder or your music library (if provided) @@ -122,20 +122,28 @@ Options: during the last run. --remove-ft Remove "ft." or "feat." and everything after from the track names before searching - --remove-regex Remove a regex from all track names and artist names + --remove-regex Remove a regex from all track titles 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-diacr-search Also perform a search without diacritics --no-regex-search Also perform a search without a regex pattern + --levenshtein-weight Results are sorted by the distance between the filename + and track title times the weight (among other things). 1 + means each differing character will downrank the result, 0 + disables this part of the sorting algorithm. (default: 0.5) --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 + --config Manually 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-downloads Max concurrent searches & downloads (default: 2) + --concurrent-downloads Max concurrent downloads (default: 2) + --searches-per-time Max searches per time interval. Higher values may cause + 30-minute bans. (default: 34) + --searches-time Controls how often available searches are replenished. + Lower values may cause 30-minute bans. (default: 220) --display