mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-10-16 13:57:25 +02:00
The provider apps' own identifiers and protocol keys were scattered as constants across six packages. They are not user secrets and stay baked in so the tool still works out of the box, but they are now mirrored into the config so that when a provider rotates one, a user can fix their install with a config edit instead of waiting for a release. Moved, each with the current value as the default in internal/config: qobuz mobile_app_id, mobile_app_secret tidal app_client_id, app_client_secret deezer api_key, gateway_key, blowfish_secret yandex sign_key, legacy_mp3_sign_salt beatport app_client_id applyVendorDefaults backfills any empty value, so configs written before these keys existed keep working and the clients never have to nil-check them. Each client reads through a small accessor; the package-level signing helpers (mobileSignRequest, yandexDownloadSign, legacyDirectURL, deriveGatewayAuthToken and friends, deriveDeezerBlowfishKey) now take the key as a parameter instead of closing over a constant. The blowfish secret reaches internal/download through a field on Downloader set by app.New. The blowfish key derivation XORs 16 bytes of the secret, so a mistyped override would have panicked; a wrong-length value is now rejected with a warning and the built-in value is used. Tests pin the length and that the qobuz mobile secret is valid hex, since the HKDF step requires it. Also drops soundcloud.client_id and soundcloud.app_version: soundcloud goes through yt-dlp, which supplies its own, so nothing read them. config.toml.example documents each new key as "leave empty unless the vendor rotates theirs". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
204 lines
6.8 KiB
TOML
204 lines
6.8 KiB
TOML
[downloads]
|
|
# Folder where tracks are downloaded to
|
|
folder = "/path/to/StreamripDownloads"
|
|
# Put Qobuz albums in a 'Qobuz' folder, Tidal albums in 'Tidal', etc.
|
|
source_subdirectories = false
|
|
# Put tracks in albums with 2+ discs into subfolders named `Disc N`
|
|
disc_subdirectories = true
|
|
# Download (and convert) tracks concurrently instead of sequentially
|
|
concurrency = true
|
|
# The maximum number of tracks to download at once
|
|
# Set to -1 for no limit
|
|
max_connections = 6
|
|
# Max number of API requests per source per minute
|
|
# Set to -1 for no limit
|
|
requests_per_minute = 60
|
|
# Verify SSL certificates for API connections
|
|
# Set to false only if certificate verification fails (not recommended)
|
|
verify_ssl = true
|
|
|
|
[qobuz]
|
|
# Quality ladder (global scale is 0-4, Qobuz supports 1-4):
|
|
# 1 = MP3 320, 2 = FLAC 16/44.1, 3 = FLAC 24-bit <=96kHz, 4 = FLAC 24-bit <=192kHz
|
|
quality = 3
|
|
# Authenticate using Qobuz auth token instead of email/password hash
|
|
use_auth_token = false
|
|
# If use_auth_token=true, set your user id. Otherwise set your email.
|
|
email_or_userid = ""
|
|
# If use_auth_token=true, set your auth token. Otherwise set md5(password).
|
|
password_or_token = ""
|
|
# Managed automatically by streamrip-go
|
|
app_id = ""
|
|
# Managed automatically by streamrip-go
|
|
secrets = []
|
|
# Vendor app credentials. Leave empty to use the values built into
|
|
# streamrip-go; set them only if Qobuz rotates theirs and you need to
|
|
# patch your install without waiting for a new release.
|
|
mobile_app_id = ""
|
|
mobile_app_secret = ""
|
|
|
|
[tidal]
|
|
# Quality ladder:
|
|
# 0 = LOW (HEAACV1), 1 = HIGH (AACLC), 2 = LOSSLESS (FLAC), 3/4 = HI_RES_LOSSLESS when available
|
|
# If a tier is unavailable, Tidal may fall back to the best available stream for that track.
|
|
quality = 3
|
|
# Prefer Dolby Atmos/immersive stream variants when available
|
|
# Disabled by default because stereo FLAC is usually preferred
|
|
prefer_atmos = false
|
|
# Download videos included in supported Tidal media
|
|
download_videos = true
|
|
|
|
# Session values are managed automatically. Do not modify manually.
|
|
user_id = ""
|
|
country_code = ""
|
|
access_token = ""
|
|
refresh_token = ""
|
|
# Unix timestamp when access_token expires
|
|
token_expiry = 0
|
|
# Vendor app credentials. Leave empty to use the values built into
|
|
# streamrip-go; set them only if Tidal rotates theirs and you need to
|
|
# patch your install without waiting for a new release.
|
|
app_client_id = ""
|
|
app_client_secret = ""
|
|
|
|
[deezer]
|
|
# Quality ladder:
|
|
# 0 = MP3_128, 1 = MP3_320, 2/3/4 = FLAC
|
|
quality = 2
|
|
# If target quality is unavailable, fallback down quality ladder
|
|
lower_quality_if_not_available = true
|
|
# Deezer ARL cookie (recommended auth method)
|
|
arl = ""
|
|
# Optional login alternative when ARL is not provided
|
|
email = ""
|
|
password = ""
|
|
# Optional cached Deezer refresh token. Managed automatically when available.
|
|
refresh_token = ""
|
|
# Vendor app credentials. Leave empty to use the values built into
|
|
# streamrip-go; set them only if Deezer rotates theirs and you need to
|
|
# patch your install without waiting for a new release.
|
|
api_key = ""
|
|
gateway_key = ""
|
|
# Must be exactly 16 characters if set.
|
|
blowfish_secret = ""
|
|
|
|
[yandex]
|
|
# Quality ladder:
|
|
# 0 = LOW (HE-AAC/AAC when available), 1 = HIGH (AAC/MP3 192), 2/3/4 = LOSSLESS when available
|
|
quality = 2
|
|
# OAuth access token for api.music.yandex.net
|
|
access_token = ""
|
|
# Cached current account uid. Managed automatically when available.
|
|
user_id = ""
|
|
# Vendor app credentials. Leave empty to use the values built into
|
|
# streamrip-go; set them only if Yandex rotates theirs and you need to
|
|
# patch your install without waiting for a new release.
|
|
sign_key = ""
|
|
legacy_mp3_sign_salt = ""
|
|
|
|
[beatport]
|
|
# Quality ladder:
|
|
# 1 = medium (AAC 128), 2 = high (AAC 256), 3/4 = lossless (FLAC 16/44.1)
|
|
# medium-hls is intentionally not supported.
|
|
quality = 3
|
|
# If a release lists more artists than this, use "Various Artists" as album artist.
|
|
# Set to -1 to disable this collapse.
|
|
various_artists_threshold = 3
|
|
# Beatport Streaming account credentials
|
|
username = ""
|
|
password = ""
|
|
# Session values are managed automatically. Do not modify manually.
|
|
access_token = ""
|
|
refresh_token = ""
|
|
# Unix timestamp when access_token expires
|
|
token_expiry = 0
|
|
# Vendor app credentials. Leave empty to use the values built into
|
|
# streamrip-go; set them only if Beatport rotates theirs and you need to
|
|
# patch your install without waiting for a new release.
|
|
app_client_id = ""
|
|
|
|
[soundcloud]
|
|
# Quality is currently provider-defined (keep 0)
|
|
quality = 0
|
|
|
|
[database]
|
|
# Track IDs already downloaded are stored here and skipped next time
|
|
downloads_enabled = true
|
|
downloads_path = "/path/to/.config/streamrip/downloads.db"
|
|
# Failed item IDs are stored here for retry/repair workflows
|
|
failed_downloads_enabled = true
|
|
failed_downloads_path = "/path/to/.config/streamrip/failed_downloads.db"
|
|
|
|
[conversion]
|
|
# Convert tracks after download
|
|
enabled = false
|
|
# ALAC, FLAC, OGG, MP3, or AAC
|
|
codec = "ALAC"
|
|
# In Hz. Audio is downsampled when above this rate.
|
|
sampling_rate = 48000
|
|
# Applied only when source bit depth is higher than this value
|
|
bit_depth = 24
|
|
# Used for lossy codecs
|
|
lossy_bitrate = 320
|
|
|
|
[qobuz_filters]
|
|
# Filter a Qobuz artist discography (best-effort for other sources)
|
|
extras = false
|
|
repeats = false
|
|
non_albums = false
|
|
features = false
|
|
non_studio_albums = false
|
|
non_remaster = false
|
|
|
|
[artwork]
|
|
# Embed artwork in the audio file
|
|
embed = true
|
|
# thumbnail, small, large, or original
|
|
embed_size = "large"
|
|
# If > 0, embedded image max(width, height) in pixels
|
|
embed_max_width = -1
|
|
# Save artwork as separate jpg file
|
|
save_artwork = true
|
|
# If > 0, saved image max(width, height) in pixels
|
|
saved_max_width = -1
|
|
|
|
[metadata]
|
|
# Set ALBUM metadata to playlist name for playlist items
|
|
set_playlist_to_album = true
|
|
# Use playlist position as tracknumber for playlist items
|
|
renumber_playlist_tracks = true
|
|
# Separator used when a provider exposes multiple artists as separate values
|
|
artist_separator = "; "
|
|
# Metadata fields to exclude from tagging
|
|
exclude = []
|
|
|
|
[filepaths]
|
|
# Create folders for single tracks using folder_format template
|
|
add_singles_to_folder = false
|
|
# Available keys: albumartist, title, year, bit_depth, sampling_rate, id, container, codec, quality, bitrate, albumcomposer
|
|
folder_format = "{albumartist} - {title} ({year}) [{container}] [{bit_depth}B-{sampling_rate}kHz]"
|
|
# Available keys: id, tracknumber, artist, albumartist, composer, title, albumcomposer, explicit
|
|
track_format = "{tracknumber:02}. {artist} - {title}{explicit}"
|
|
# Restrict filenames to printable ASCII
|
|
restrict_characters = false
|
|
# Truncate filenames longer than this value
|
|
truncate_to = 120
|
|
|
|
[lastfm]
|
|
# Primary source used to resolve Last.fm playlist tracks
|
|
source = "qobuz"
|
|
# Fallback source when primary lookup fails
|
|
fallback_source = ""
|
|
|
|
[cli]
|
|
# Print informational output like "Downloading <album>"
|
|
text_output = true
|
|
# Show resolve and download progress bars
|
|
progress_bars = true
|
|
# Max interactive search results displayed
|
|
max_search_results = 100
|
|
|
|
[misc]
|
|
# Metadata used for config compatibility checks
|
|
version = "2.2.0"
|