Files
NovaSonic/backend/lib/config.js
T
HoneyandClaude Sonnet 4.6 468827571a feat: switch Spotify auth to official Client Credentials Flow
Replaces the broken open.spotify.com/get_access_token scrape with
accounts.spotify.com/api/token (Basic auth, client_credentials grant).
Adds SPOTIFY_CLIENT_ID/SECRET to config, docker-compose, and .env.example.
Health endpoint now reports spotify.configured; frontend disables the
importer and shows a setup guide when credentials are missing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 22:57:01 +02:00

18 lines
880 B
JavaScript

const CONFIG = {
port: process.env.PORT || 3700,
musicPath: process.env.MUSIC_PATH || '/music',
ytdlpBin: process.env.YTDLP_BIN || 'yt-dlp',
audioFmt: process.env.AUDIO_FMT || 'mp3',
audioQuality: process.env.AUDIO_QUALITY || '0',
maxParallel: parseInt(process.env.MAX_PARALLEL || '2', 10),
// 'ytdlp' | 'squid' | 'auto' (squid first, yt-dlp fallback)
downloadBackend: (process.env.DOWNLOAD_BACKEND || 'auto').toLowerCase(),
// squid.wtf quality: 'mp3' | 'flac' | 'hi-res'
squidQuality: (process.env.SQUID_QUALITY || 'mp3').toLowerCase(),
// Spotify Developer credentials (Client Credentials Flow — free, no Premium needed)
spotifyClientId: process.env.SPOTIFY_CLIENT_ID || '',
spotifyClientSecret: process.env.SPOTIFY_CLIENT_SECRET || '',
};
module.exports = CONFIG;