### Start Local Mock Daemon Source: https://github.com/fiso64/sockseek/blob/master/docs/api.md Use this command to start a local mock daemon for client development. It requires a directory of mock music files and specifies various configuration options for the mock server. ```bash python scripts/create_mock_music_library.py -o /tmp/sockseek-fixture dotnet run --project Sockseek.Cli -- daemon \ --mock-files-dir /tmp/sockseek-fixture/mock-library \ --mock-files-no-read-tags \ --mock-files-slow \ --server-port 5030 \ -p /tmp/sockseek-out ``` -------------------------------- ### Build and Start Sockseek Container Source: https://github.com/fiso64/sockseek/blob/master/docs/docker.md Clone the Sockseek repository, navigate to the directory, and start the Docker Compose stack to build and run the container. ```shell clone https://github.com/fiso64/sockseek cd Sockseek docker compose up -d ``` -------------------------------- ### Start Sockseek Daemon and Connect CLI Source: https://github.com/fiso64/sockseek/blob/master/README.md Starts the Sockseek daemon on a specified IP and port, and then connects the CLI client to it using a remote URL. ```bash sockseek daemon --server-ip 0.0.0.0 --server-port 5030 sockseek "Artist - Title" --remote http://127.0.0.1:5030 ``` -------------------------------- ### Example Sockseek Configuration File Source: https://github.com/fiso64/sockseek/blob/master/README.md Illustrates the basic syntax for a Sockseek configuration file, including username, password, and preferences. ```ini username = your-username password = your-password pref-format = flac fast-search = true ``` -------------------------------- ### Configuration Profile Example Source: https://github.com/fiso64/sockseek/blob/master/README.md Shows how to define a configuration profile named 'lossless' to set specific preferences. ```ini [lossless] pref-format = flac,wav ``` -------------------------------- ### Sockseek Configuration Profile for Wishlist Source: https://github.com/fiso64/sockseek/blob/master/README.md Example of a profile configuration in sockseek.conf for managing a wishlist. This setup includes input file path, input type, index path for tracking downloaded items, and a log file. ```ini [wishlist] input = ~/sockseek/wishlist.txt input-type = list index-path = ~/sockseek/wishlist-index.sockseek log-file = ~/sockseek/wishlist.log ``` -------------------------------- ### Wishlist File Format Example Source: https://github.com/fiso64/sockseek/blob/master/README.md Example of how to format entries in the wishlist.txt file. Each line can specify a song or album with optional parameters like strict matching and desired format. ```text "Artist - My Favorite Song" strict-title=true;format=flac a:"Artist - Some Album" strict-album=true;album-track-count=5 ``` -------------------------------- ### List File Input Example Source: https://github.com/fiso64/sockseek/blob/master/README.md Demonstrates the format for a text file used with `--input-type=list`. Supports various input types and optional conditions for filtering search results. ```text # Any input type conditions (optional) pref. conditions (optional) "Artist - Song" "format=mp3; br>128" "br >= 320" # Album download shorthand: a:"Artist - Album" strict-album=true;album-track-count=13 # Any other input type is also accepted: path/to/tracks.csv https://www.youtube.com/playlist?list=blah ``` -------------------------------- ### Basic Name Format Example Source: https://github.com/fiso64/sockseek/blob/master/README.md A simple naming pattern using artist and title tags. This is a basic format for naming files. ```text {artist} - {title} ``` -------------------------------- ### Configure Cron Job for Sockseek Source: https://github.com/fiso64/sockseek/blob/master/docs/docker.md Example of a cron job entry to run Sockseek for a specific task, such as searching for missing tracks from a Spotify playlist. This entry specifies the schedule and the command with its arguments. ```shell # min hour day month weekday command 0 1 * * 0 sockseek https://open.spotify.com/playlist/6sf1WR5grXGJ6dET -c /config -p /data --index-path /data/index.sockseek --spotify-id 123456 --spotify-secret 123456 ``` -------------------------------- ### yt-dlp Integration for Sockseek Downloads Source: https://github.com/fiso64/sockseek/blob/master/README.md Configure Sockseek to use yt-dlp for downloading tracks not found on Soulseek. Ensure yt-dlp is installed and accessible via the command line. ```bash --yt-dlp Use yt-dlp to download tracks that weren't found on Soulseek. yt-dlp must be available from the command line. --yt-dlp-argument The command line arguments when running yt-dlp. Default: "{id}" -f bestaudio/best -ci -o "{savepath-noext}.%(ext)s" -x Available vars are: {id}, {savedir}, {savepath}, {savepath-noext}. Warning: If you change the -o parameter, Sockseek won't be able to index the downloaded files. Note that -x causes yt-dlp to download webms in case ffmpeg is unavailable. ``` -------------------------------- ### Interactive Album Download with Track Count Filter Source: https://github.com/fiso64/sockseek/blob/master/README.md Initiate an interactive album download, filtering to include only albums with a specified minimum number of tracks. The example filters for albums with 13 or more tracks. ```bash sockseek "Album Name" -at --atc 13+ ``` -------------------------------- ### Configuring Conditions with --cond and --pref Source: https://github.com/fiso64/sockseek/blob/master/README.md Demonstrates how to supply conditions and preferences as a semicolon-delimited string using command-line arguments. ```bash --cond "br>=320; format=mp3,ogg; sr<96000" --pref "album-track-count>=8; required-track-title=Intro" ``` -------------------------------- ### Test Search Logic with Mock Files Source: https://github.com/fiso64/sockseek/blob/master/README.md Utilize the --mock-files-dir option to test search and download logic using local audio files instead of live Soulseek searches. This is useful for testing with a large music library. ```bash sockseek "Artist - Album" -at --mock-files-dir /path/to/dir ``` ```bash sockseek "Artist - Album" -at --mock-files-dir /path/to/dir --mock-files-no-read-tags ``` -------------------------------- ### Preview Playlist Tracks Before Download Source: https://github.com/fiso64/sockseek/blob/master/README.md Check up to 10 tracks from a large playlist before initiating a full download. Use `--print-tracks-full` for detailed track information. ```bash sockseek "input" -n 10 --print-tracks-full ``` -------------------------------- ### Daemon / Remote Options for Sockseek Source: https://github.com/fiso64/sockseek/blob/master/README.md Options for running sockseek as a daemon or connecting to a remote daemon. ```text sockseek daemon Start the HTTP/SignalR daemon instead of running a download --server-ip IP/interface for the daemon HTTP API (default: 127.0.0.1) --server-port Port for the daemon HTTP API (default: 5030) --remote Use an existing daemon instead of running locally ``` -------------------------------- ### Download Options Reference Source: https://github.com/fiso64/sockseek/blob/master/README.md Commonly used flags for controlling download behavior, such as downloading entire folders or interactively selecting files. ```text -a, --album Download a whole folder instead of a single file -t, --interactive Pick from album results before downloading -g, --aggregate Download distinct songs/albums from grouped results -p, --path Download directory --pref-format Preferred formats for ranking, e.g. flac,wav. Unordered. --format Required accepted formats. Unordered. --album-track-count Required number of audio files when downloading albums --skip-music-dir Skip tracks already in a music library --profile Apply configuration profile(s) --name-format Organize files using a path template --strict-title/artist/album Require title in filename, artist in path, album in folder path ``` -------------------------------- ### Queue Downloaded Audio Files in foobar2000 Source: https://github.com/fiso64/sockseek/blob/master/README.md Queues downloaded audio files into foobar2000 upon successful download. This command hides the window and checks if the file is audio before adding it. ```ini on-complete = when=success hidden -- cmd /c if {is-audio}==true start "" "path\to\foobar2000.exe" /immediate /add "{path}" ``` -------------------------------- ### Conditional Profile Configuration Source: https://github.com/fiso64/sockseek/blob/master/README.md Demonstrates defining profiles with conditions, such as 'no-stale' for album downloads and 'youtube' for specific download paths. ```ini # never automatically cancel album downloads in interactive mode [no-stale] profile-cond = interactive && download-mode == "album" max-stale-time = 9999999 # download to another location for YouTube [youtube] profile-cond = input-type == "youtube" path = ~/downloads/sockseek-youtube ``` -------------------------------- ### Fast Search Options for Sockseek Source: https://github.com/fiso64/sockseek/blob/master/README.md Configure rapid downloading and candidate acceptance criteria. These options are primarily for normal download modes. ```bash --fast-search Begin downloading as soon as a file satisfying the preferred conditions is found. Only for normal download mode. --fast-search-delay Delay before accepting fast-search candidates (default: 300) --fast-search-min-up-speed Minimum upload speed for fast-search candidates (default: 1) ``` -------------------------------- ### General Sockseek Options Source: https://github.com/fiso64/sockseek/blob/master/README.md Provides a comprehensive list of general options for managing downloads, input types, naming conventions, and concurrency. ```text -p, --path Download directory --input-type [csv|youtube|spotify|bandcamp|string|list|soulseek| musicbrainz] (default: auto) --name-format Name format for downloaded tracks. See `--help name-format` --invalid-replace-str Replacement string for invalid path characters (default: space) -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 -c, --config Set config file location. Set to 'none' to ignore config --no-config Ignore any config file --profile Configuration profile(s) to use. See `--help config`. --concurrent-jobs Max concurrent leaf jobs (default: 20) --concurrent-searches Max concurrent Soulseek searches (default: 2) --concurrent-extractors Max concurrent input extractors (default: 4) --write-playlist Create an m3u playlist file in the output directory --playlist-path Override default path for m3u playlist file --no-write-index Do not create/update the Sockseek index --index-path Override default path for Sockseek index --no-incomplete-ext Save files with their final name instead of a temporary `.incomplete` extension. --no-skip-existing Do not skip downloaded tracks --skip-mode-output-dir How to match files in the output dir: name|tag|index (default: index) --skip-check-cond Check file conditions when skipping existing files --skip-check-pref-cond Check preferred conditions when skipping existing files --skip-music-dir Also skip downloading tracks found in a music library --skip-mode-music-dir How to match files in --skip-music-dir: name|tag (default: name) --skip-not-found Skip searching for tracks that weren't found on Soulseek during the last run. --listen-port Port for incoming connections (default: 49998) --no-listen Disable the incoming connection listener --connect-timeout Timeout used when logging in to Soulseek (default: 20000ms) --user-description Optional description text for your Soulseek account --shared-files Number of files you share on Soulseek (default: 0) --shared-folders Number of folders you share on Soulseek (default: 0) --on-complete Run a command when a download completes. See `--help on-complete` ``` -------------------------------- ### Download an Album Interactively with Sockseek Source: https://github.com/fiso64/sockseek/blob/master/README.md This command allows for interactive album downloads. The '-at' flag enables interactive mode for album downloads, letting you choose which tracks to download. ```bash sockseek "Artist - Album Title" -at ``` -------------------------------- ### Download All Artist Albums Interactively Source: https://github.com/fiso64/sockseek/blob/master/README.md Interactively download all albums by a specified artist, sorted by popularity. This may include compilations. ```bash sockseek "artist=Artist Name" -agt ``` -------------------------------- ### Convert Downloaded Audio Files to MP3 on Windows Source: https://github.com/fiso64/sockseek/blob/master/README.md A multi-step process to convert downloaded audio files to MP3 on Windows, including checks for audio type, existing MP3, and conversion success. Requires ffmpeg. ```ini # Check if file is audio and not already MP3 on-complete = when=success hidden -- cmd /c if "{is-audio}"=="true" if /i not "{ext}"==".mp3" if not exist "{path-noext}.mp3" echo true ``` ```ini # Convert to MP3 if check passed on-complete = + when=success hidden -- cmd /c if /i "{stdout}"=="true" (ffmpeg -i "{path}" -q:a 0 "{path-noext}.mp3" && echo success) ``` ```ini # Delete original and update index if conversion succeeded on-complete = + when=success hidden update-index -- cmd /c if /i "{stdout}"=="success" (del "{path}" & echo "ignored;{path-noext}.mp3") ``` -------------------------------- ### Download a Track with Sockseek Source: https://github.com/fiso64/sockseek/blob/master/README.md Use this command to download a specific track by providing the artist and song title as a search string. Sockseek will search the network and download the best match. ```bash sockseek "Artist - Song Title" ``` -------------------------------- ### YouTube Data API Configuration for Sockseek Source: https://github.com/fiso64/sockseek/blob/master/README.md Configure Sockseek to use the YouTube Data API for retrieving video information. Requires a valid API key. ```bash --youtube-key YouTube Data API key --get-deleted Attempt to retrieve titles of deleted videos from wayback machine. Requires yt-dlp. --deleted-only Only retrieve & download deleted music. ``` -------------------------------- ### Printing and Debugging Options for Sockseek Source: https://github.com/fiso64/sockseek/blob/master/README.md Options for controlling the verbosity of output and directing debug information. Use `--log-file` to write debug information to a specified file. `--progress-json` enables printing progress events as JSON lines. Various `--print` options allow outputting tracks, search results, or index information in different formats. ```bash -v, --verbose Print extra debug info ``` ```bash -vv, --trace Print trace-level debug info ``` ```bash --debug Alias for --verbose ``` ```bash --log-file Write debug info to a specified file ``` ```bash --no-progress Disable progress bars/percentages, only simple printing ``` ```bash --progress-json Print progress events as JSON lines ``` ```bash --print