Files
alembic/pipeline/configs/_template.conf
T
andrew e5d9c7f043 0.6: Spotify OAuth connect flow, AzuraCast base URL, fingerprint/buy-url fixes
- Add "Connect Spotify" OAuth flow (/connect/spotify) so newly created Spotify
  apps can read playlists: Spotify now requires a user token for playlist
  reads, which client-credentials alone can no longer provide. The stored
  refresh token is rendered as spotify-refresh into each playlist's sldl
  .conf -- sldl's own docs confirm supplying it skips its interactive login
  flow, which is what was causing multi-hour hangs on a stuck sync.
  Grandfathered apps keep working unchanged if no account is connected.
- Fix the connect flow's redirect_uri: request.url_for() reflected the raw
  connection scheme (http) rather than what the reverse proxy actually
  served over, which Spotify's exact-match redirect_uri check rejected.
  Force https rather than trust the unproxied scheme.
- Add an AzuraCast base URL credential field alongside the API key, with a
  keyfile fallback so the scheduled enrich-buy-url.py job can actually reach
  AzuraCast (previously it had no way to receive a base URL at all when run
  from the scheduler, so the reprocess call was silently always skipped).
- Fix build-fingerprint-index.py exiting non-zero on any single fingerprint
  failure instead of only when nothing was written.
- Guard enrich-buy-url.py's AzuraCast reprocess against an empty
  --azuracast-base (raised ValueError since PD2 removed the hardcoded base).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 11:16:55 -06:00

81 lines
2.8 KiB
Plaintext

# Template for per-playlist sldl configs (sldl 2.6.0.0).
# Flags verified against `sldl --help` output.
#
# sldl runs as a subprocess inside the alembic container (same container as
# beets, on gluetun's network namespace for VPN-routed Soulseek P2P).
# This is a TEMPLATE. The app renders one <playlist>.conf per playlist from it
# (credential_service.render_playlist_confs), substituting PLAYLIST_NAME,
# SPOTIFY_URL, SLDL_DROPBOX_ROOT and the credential lines below in one pass.
# The placeholder values here are overwritten at render time; edit the
# non-placeholder settings (quality, timeouts, ports) to change every playlist.
# ==== Soulseek credentials ====
user = SOULSEEK_USER
pass = SOULSEEK_PASS
# ==== Spotify API credentials ====
spotify-id = SPOTIFY_CLIENT_ID
spotify-secret = SPOTIFY_CLIENT_SECRET
# Set once an account is connected via /connect/spotify (blank otherwise).
# sldl's own docs confirm supplying a refresh token skips its interactive
# login-flow requirement entirely -- this is what lets newly created Spotify
# apps (which Spotify blocks from reading playlists with client-credentials
# alone) work without sldl ever trying to open a browser.
spotify-refresh = SPOTIFY_REFRESH_TOKEN
# ==== Input (Spotify playlist URL) ====
input = SPOTIFY_URL
input-type = spotify
# ==== Output paths ====
# SLDL_DROPBOX_ROOT is substituted at render time from $MUSIC_DATA_DIR
# (sldl's own config format has no env-var expansion).
path = SLDL_DROPBOX_ROOT/PLAYLIST_NAME
playlist-path = SLDL_DROPBOX_ROOT/PLAYLIST_NAME/_sldl.m3u8
write-playlist = true
# ==== Naming ====
name-format = {artist} - {title}
# ==== Concurrent downloads ====
# Higher values download from more peers simultaneously.
# Each peer is usually ~100-500 KB/s, so 10 concurrent ≈ 1-5 MB/s total.
# Bandwidth isn't the bottleneck on Soulseek - peer availability is.
concurrent-downloads = 10
# ==== Search behavior ====
fast-search = true
search-timeout = 60000
max-stale-time = 50000
searches-per-time = 34
searches-renew-time = 220
# ==== Soulseek listen port ====
# Picking a port that:
# - is below Linux's ephemeral range (32768-60999), so the OS won't auto-pick
# it for slskd's outbound peer connections;
# - is NOT one of slskd's bound ports inside gluetun (slskd uses 5030 HTTP,
# 5031 HTTPS, 50300 Soulseek listen);
# - is NOT used by any other gluetun-network container (qbittorrent: 6881,
# shelfmark: 8084).
# 9876 fits all three.
listen-port = 9876
# ==== Quality hard filters (strict - files not matching are rejected) ====
format = flac,mp3
min-bitrate = 320
# ==== Quality preferences (soft - controls ranking among accepted files) ====
pref-format = flac,wav,mp3
pref-min-bitrate = 320
pref-max-bitrate = 2500
# ==== Strict filtering (hard - rejects files that don't match) ====
strict-title = true
strict-artist = true
# ==== Misc ====
verbose = true
no-browse-folder = true