Auto-load .env; make --spotify-full force the cached path too

The live fetch was being skipped because creds never reached the process:
Env.py only read os.environ, and .env uses `export ...`, so without a prior
`source .env` the run fell to the cached branch — which then skipped on an
unchanged cache signature ("Spotify cache unchanged — skipping").

- Env.py now auto-loads a project-root .env (setdefault, so an exported value
  still wins; tolerates `export ` and quotes).
- --spotify-full now also passes force=True to ingest_spotify, so the cached
  fallback re-ingests instead of skipping.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Шурупов Илья Викторович 2026-06-16 00:48:03 +03:00
parent 48bf84bcb7
commit cbb127115c
3 changed files with 29 additions and 3 deletions

View file

@ -51,9 +51,12 @@ pip install -r requirements.txt
### Configure (`.env`)
```bash
cp .env.example .env # then edit and `source .env`
cp .env.example .env # then edit — it's auto-loaded (no `source` needed)
```
The project root `.env` is read automatically on startup; any variable already
exported in your shell still takes precedence.
Three things you point at your own data:
| Variable | What |