From 78d65646952d5e904ac6403107bcc33abaabe8b2 Mon Sep 17 00:00:00 2001 From: fiso64 Date: Thu, 23 May 2024 21:24:51 +0200 Subject: [PATCH] commit --- README.md | 107 ++- slsk-batchdl/Program.cs | 1374 ++++++++++++++++++++---------- slsk-batchdl/Spotify.cs | 61 +- slsk-batchdl/Utils.cs | 83 +- slsk-batchdl/YouTube.cs | 57 +- slsk-batchdl/slsk-batchdl.csproj | 5 +- 6 files changed, 1155 insertions(+), 532 deletions(-) diff --git a/README.md b/README.md index 7230c9b..3426fbe 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A batch downloader for Soulseek built with Soulseek.NET. Accepts CSV files or Sp Download tracks from a csv file: ``` -slsk-batchdl test.csv +sldl test.csv ```
CSV details @@ -19,7 +19,7 @@ The names of the columns in the csv should be: `Artist`, `Title`, `Album`, `Leng Download spotify likes while skipping songs that already exist in the output folder: ``` -slsk-batchdl spotify-likes --skip-existing +sldl spotify-likes --skip-existing ```
Spotify details @@ -32,7 +32,7 @@ To download private playlists or liked songs you will need to provide a client i Download from a youtube playlist with fallback to yt-dlp in case it is not found on soulseek, and retrieve deleted video titles from wayback machine: ``` -slsk-batchdl --get-deleted --yt-dlp "https://www.youtube.com/playlist?list=PLI_eFW8NAFzYAXZ5DrU6E6mQ_XfhaLBUX" +sldl --get-deleted --yt-dlp "https://www.youtube.com/playlist?list=PLI_eFW8NAFzYAXZ5DrU6E6mQ_XfhaLBUX" ```
YouTube details @@ -46,34 +46,48 @@ Also note that due the high number of music videos in the above example playlist Search & download a specific song, preferring lossless: ``` -slsk-batchdl "title=MC MENTAL @ HIS BEST,length=242" --pref-format "flac,wav" +sldl "title=MC MENTAL @ HIS BEST,length=242" --pref-format "flac,wav" ``` +
+ String details + + The shorthand `sldl "Artist - Title"` is equivalent to `sldl "artist=Artist,title=Title"`. + +

Interactive album download: ``` -slsk-batchdl "album=Some Album" --interactive -``` +sldl "album=Some Album" --interactive +``` +
+ Album details + + The shorthand `sldl "Artist - Album" -a` is equivalent to `sldl "artist=Artist,album=Album"`. It's often helpful to restrict to folders which have two or more tracks: `--atc 2+`. + +

Print all songs by an artist which are not in your library: ``` -slsk-batchdl "artist=MC MENTAL" --aggregate --print tracks-full --skip-existing --music-dir "path\to\music" +sldl "artist=MC MENTAL" --aggregate --skip-existing --music-dir "path/to/music" --print tracks-full ``` ## Download Modes Depending on the provided input, the download behaviour changes: -- Normal download: When the song title is set (in the CSV row, or in the string input), the program will download a single file for every entry. -- Album download: When the album name is set and the song title is NOT set, the program will search for the album and download the entire folder. -- Aggregate download: With `--aggregate`, the program will first perform an ordinary search for the input, then attempt to group the results into distinct songs and download one of each kind. This can be used to download an artist's entire discography (or simply printing it, like in the example above), finding remixes of a song, etc. Note that it is not 100% reliable, which is why `--min-users-aggregate` is set to 2 by default, i.e. any song that is shared by only one person will be ignored. Enabling `--relax` will give even more results. +- Normal download: The program will download a single file for every input entry. +- Album download: The program will search for the album and download an entire folder including non-audio files. Activated when the input is a link to a spotify or bandcamp album, or when the input is a string with unset track title, or when `-a`/`--album` is enabled. Downloading multiple albums from a CSV is also supported. +- Aggregate download: With `-g`/`--aggregate`, the program will first perform an ordinary search for the input, then attempt to group the results into distinct songs and download one of each kind. This can be used to download an artist's entire discography (or simply printing it, like in the example above), finding remixes of a song, etc. Note that it is not 100% reliable, which is why `--min-users-aggregate` is set to 2 by default, i.e. any song that is shared by only one person will be ignored. Enable `--relax-filtering` to make the file filtering less aggressive. ## Options + +Acronyms of two- and --three-word-arguments are also accepted, e.g. --twa ``` -Usage: slsk-batchdl [OPTIONS] +Usage: sldl [OPTIONS] is one of the following: @@ -99,14 +113,14 @@ Options: --user Soulseek username --pass Soulseek password - -p --path Download folder + -p --path Download directory -f --folder Subfolder name. Set to '.' to output directly to the download folder (default: playlist/csv name) -n --number Download the first n tracks of a playlist -o --offset Skip a specified number of tracks -r --reverse Download tracks in reverse order - --nf --name-format Name format for downloaded tracks, e.g "{artist} - {title}" - --fs --fast-search Begin downloading as soon as a file satisfying the preferred + --name-format Name format for downloaded tracks, e.g "{artist} - {title}" + --fast-search Begin downloading as soon as a file satisfying the preferred conditions is found. Increases chance to download bad files. --m3u