{"id":28224,"library":"spotifysaver","title":"SpotifySaver","description":"Download Spotify tracks/albums/playlists with metadata via YouTube Music, designed for Jellyfin libraries. Current version 0.7.5, requires Python 3.9-3.12. Development is active with regular releases.","status":"active","version":"0.7.5","language":"python","source_language":"en","source_url":"https://github.com/gabrielbaute/spotify-saver","tags":["spotify","youtube-music","downloader","metadata","jellyfin","cli","api"],"install":[{"cmd":"pip install spotifysaver","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for downloading audio from YouTube Music","package":"yt-dlp","optional":false},{"reason":"Required for embedding metadata into audio files","package":"mutagen","optional":false},{"reason":"Required for running the built-in API server","package":"uvicorn","optional":true}],"imports":[{"note":"Hyphen in GitHub repo name, but PyPI package uses no hyphen.","wrong":"from spotify_saver import SpotifySaver","symbol":"SpotifySaver","correct":"from spotifysaver import SpotifySaver"},{"note":"CLI entry point is in the cli submodule.","wrong":"from spotifysaver import run_cli","symbol":"run_cli","correct":"from spotifysaver.cli import run_cli"}],"quickstart":{"code":"from spotifysaver import SpotifySaver\nimport os\n\n# Initialize with Spotify API credentials (set in .env or environment)\nos.environ['SPOTIFY_CLIENT_ID'] = os.environ.get('SPOTIFY_CLIENT_ID', 'your_client_id')\nos.environ['SPOTIFY_CLIENT_SECRET'] = os.environ.get('SPOTIFY_CLIENT_SECRET', 'your_client_secret')\n\nsaver = SpotifySaver()\nsaver.download('https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT')","lang":"python","description":"Download a Spotify track by URL."},"warnings":[{"fix":"Set environment variables or run `spotifysaver init` to create .env file interactively.","message":"The SpotifySaver class requires valid Spotify API credentials. Set SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET in environment variables or .env file before calling download().","severity":"gotcha","affected_versions":">=0.1.5"},{"fix":"Specify format='m4a' in constructor or set in .env: SPOTIFYSAVER_FORMAT=m4a.","message":"In v0.6.0, the default download format changed from m4a to opus. If you rely on m4a output, you must explicitly set format='m4a' when initializing SpotifySaver or in config.","severity":"breaking","affected_versions":">=0.6.0"},{"fix":"Use `spotifysaver run <url>` instead.","message":"The CLI command `spotifysaver download` is deprecated in favor of `spotifysaver run` (v0.5.0+).","severity":"deprecated","affected_versions":">=0.5.0"},{"fix":"No built-in workaround; feature request pending.","message":"Playlist downloads create a single directory without subdirectories per artist/album. If you need subdirectories, consider using the API and handling paths manually.","severity":"gotcha","affected_versions":">=0.3.0"},{"fix":"Change port with `spotifysaver serve --port 8080` or set SERVER_PORT in .env.","message":"If you run the API server (`spotifysaver serve`), the web UI is served on port 8000 by default. Ensure that port is not in use.","severity":"gotcha","affected_versions":">=0.6.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install spotifysaver` and import as `from spotifysaver import SpotifySaver`.","cause":"Package not installed or imported with wrong name (e.g., spotify_saver).","error":"ModuleNotFoundError: No module named 'spotifysaver'"},{"fix":"Use `spotifysaver run <url>` instead of `spotifysaver download <url>`.","cause":"Using deprecated `download` subcommand instead of `run`.","error":"spotifysaver: error: argument command: invalid choice: 'download' (choose from 'run', 'init', 'serve', 'version')"},{"fix":"Run `spotifysaver init` to create .env file with your credentials, or export them manually.","cause":"Environment variables not set.","error":"ValueError: Missing Spotify API credentials. Set SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET."},{"fix":"Double-check the URL and ensure it points to a valid Spotify track, album, or playlist.","cause":"Occurs when a track/album URL is invalid or not found on Spotify.","error":"Error: 'NoneType' object has no attribute 'get'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}