mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-10-16 13:57:25 +02:00
Dead code Removed, each verified to have no non-test caller: promptSearchSelection (77 lines, superseded by promptSearchSelectionMenu), AddPlaylistByTrackIDs, download.NewWithVerifySSL, qobuz.Client.GetTrackMetadata, tidal.Client.trackSupportsAtmos (test-only, and the comment above GetDownloadable already documented its removal from the live path) and its now-orphaned test, yandex.canonicalTrackRequestID (a no-op returning its trimmed input; the call site uses strings.TrimSpace directly) and the unused defaultEstimatedKbps constant. Config keys that did nothing qobuz.download_booklets and misc.check_for_updates were declared, defaulted and documented in config.toml.example but read by no code. The whole [youtube] block went too: there is no YouTube provider. go-toml ignores unknown keys, verified, so existing user configs still load. Duplicated helpers tidal.stringify and yandex.firstNonEmpty were byte-identical copies of jsonutil.StringFromAny and jsonutil.FirstNonEmpty. displayArtistNames existed three times, byte-identical, in internal/app, provider/yandex and provider/beatport; it now lives in jsonutil. The CLI's normalizeCodec delegates to config.NormalizeCodec so the flag and the config file are checked by the same rules. Tests for packages that had none internal/jsonutil (0% -> 100%) and internal/netutil (0% -> 78%), the latter covering redactURL, which is a security control, and the zero-timeout contract that internal/download and the qobuz body copy depend on. internal/config rose to 82% with coverage of the new Validate(), the 0600 permissions, CloneConfigData not sharing slices, and a concurrent UpdateTokens test that exercises the mutex under -race. Test suite is ~85x faster Provider tests built clients with the default 60 requests/minute, so the rate limiter slept 1s per HTTP call: deezer took 31s, tidal 11s, qobuz 8s. Each provider test package now builds its config through a testConfigData helper that disables throttling. Whole suite: ~60s -> 0.7s, and 2.8s under -race. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
181 lines
5.7 KiB
TOML
181 lines
5.7 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 = []
|
|
|
|
[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
|
|
|
|
[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 = ""
|
|
|
|
[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 = ""
|
|
|
|
[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
|
|
|
|
[soundcloud]
|
|
# Quality is currently provider-defined (keep 0)
|
|
quality = 0
|
|
# Managed automatically when available
|
|
client_id = ""
|
|
app_version = ""
|
|
|
|
[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"
|