Incremental Spotify ingest + --no-enrich

- spotify_raw: skip re-ingesting when the cache files are unchanged (signature
  in ingest_state), matching the iTunes/local incremental behaviour — so a
  re-run with no changes touches nothing.
- fetch --no-enrich: skip MusicBrainz enrichment and rely on MBIDs already on
  tracks (e.g. local Picard tags).

Verified on the real library: 1st run ~9s, unchanged re-run ~0.3s with all
three sources skipping; with enrichment off, 1164 Spotify tracks still match
locally by ISRC/MBID from tags.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Шурупов Илья Викторович 2026-06-15 02:04:54 +03:00
parent 03b98d9a1d
commit ca1ca74244
369 changed files with 7440624 additions and 11 deletions

View file

@ -19,7 +19,7 @@ def cmd_fetch(args):
_setup_logging()
from src.workflows import run_fetch
run_fetch(enrich_limit=args.enrich_limit)
run_fetch(enrich_limit=args.enrich_limit, enrich=not args.no_enrich)
def cmd_display(args):
@ -54,6 +54,8 @@ def build_parser():
fetch = sub.add_parser("fetch", help="incrementally fetch + scan + enrich + match")
fetch.add_argument("--enrich-limit", type=int, default=None,
help="cap MBID lookups this run (default: resolve all)")
fetch.add_argument("--no-enrich", action="store_true",
help="skip MusicBrainz enrichment; use MBIDs already on tracks")
sub.add_parser("display", help="open the Streamlit GUI")