Wire the incremental pipeline to real sources and expose two workflows. Config (Env.py): three explicit paths — LOCAL_LIBRARY_PATH (scan source), ITUNES_XML_PATH (manual export), DATA_DIR (storage root: DB + Spotify cache). Real, incremental ingesters: - local_scan: walks the library, skips files whose mtime/size are unchanged, prunes deleted ones, and reads embedded ISRC + recording MBID from tags (tagged files get real IDs with no network), via tags.py. - itunes_xml: parse the iTunes Library.xml as a plist; skip if mtime unchanged. - spotify_raw: ingest raw Spotify JSON (ISRC from external_ids); live fetch wrapper for when credentials are set. Workflows (src/workflows.py + main.py): - `fetch` — pull + scan + parse + enrich + match, with readable step logs. First run is slow (full scan + MB lookups); later runs only touch changes (verified: ~71s first, ~0.6s second). - `display` — launch the GUI. Also: enrich uses ISRC-first again (local MBIDs now come from tags), fix --enrich-limit 0, quiet musicbrainzngs XML warnings, ignore /data/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
18 lines
1,020 B
Text
18 lines
1,020 B
Text
# Copy to `.env`, fill in, then `source .env` before running.
|
|
|
|
# --- the three things you point at your own data ---------------------------
|
|
# Folder of audio files to scan (tags incl. ISRC / MusicBrainz id are read).
|
|
export LOCAL_LIBRARY_PATH=~/Music
|
|
# iTunes/Music "Library.xml" you export manually (File > Library > Export Library…).
|
|
export ITUNES_XML_PATH=~/Music/iTunes\ Library.xml
|
|
# Storage root: the database and cached Spotify responses live here.
|
|
export DATA_DIR=./data
|
|
|
|
# --- Spotify credentials (only needed for live fetching) -------------------
|
|
# https://developer.spotify.com/dashboard — register http://127.0.0.1:8888 as a Redirect URI.
|
|
export SPOTIFY_CLIENT_ID=your_client_id_here
|
|
export SPOTIFY_CLIENT_SECRET=your_client_secret_here
|
|
|
|
# --- optional --------------------------------------------------------------
|
|
# export MB_CONTACT=you@example.com # MusicBrainz User-Agent contact
|
|
# export DATABASE_URL=postgresql+psycopg://u:p@localhost/mi # use Postgres instead of SQLite
|