Add --except PATTERN option and update documentation
- --except filters albums by directory name (glob or substring, repeatable) - README.md: new options table entries, new cover sources, updated pipeline, corrected test count (33), added batch example - BEDIENUNGSANLEITUNG.md: new options table, sections E (batch+except), F (--status), LASTFM_API_KEY env var, corrected test count Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cd6c0ae185
commit
0ca05e91d4
3 changed files with 77 additions and 9 deletions
31
README.md
31
README.md
|
|
@ -17,11 +17,14 @@ API-Key nutzbar, mit lokalem LLM (Ollama) für lückenhafte Metadaten.
|
|||
- **OCR Back-Cover** — liest Tracklisten aus `back.jpg` / Booklet-Bildern via
|
||||
Ollama Vision (qwen3-vl, minicpm-v)
|
||||
- **MusicBrainz-Lookup** — Textsuche + AcoustID-Fingerprinting (optional)
|
||||
- **Discogs-Fallback** — bei MusicBrainz-Misses
|
||||
- **Discogs-Fallback** — Cover + vollständige Trackliste bei MusicBrainz-Misses
|
||||
- **iTunes Search API** — Cover-Fallback (gratis, kein Key)
|
||||
- **Last.fm** — Cover + Tracklist-Fallback (kostenloser API-Key)
|
||||
- **LLM-Reasoning** — Ollama (lokal, kostenlos) → OpenRouter (DeepSeek V3) für
|
||||
unklare / widersprüchliche Metadaten
|
||||
- **Cover-Art** — lokal (JPG/PNG/WebP) → MusicBrainz Cover Art Archive → einbetten
|
||||
in MP3/FLAC/M4A; WebP wird automatisch zu JPEG konvertiert
|
||||
- **Cover-Art** — lokal (JPG/PNG/WebP) → MusicBrainz Cover Art Archive (front + back)
|
||||
→ Discogs → iTunes Search API → Last.fm; einbetten in MP3/FLAC/M4A;
|
||||
WebP wird automatisch zu JPEG konvertiert, Cover immer als `folder.jpg` gespeichert
|
||||
- **Tag-Schreiben** — title, artist, album, albumartist, tracknumber, discnumber,
|
||||
date, genre, label (mutagen, ID3v2.4)
|
||||
- **Umbenennen** — normiertes Dateinamen-Schema mit Unterstrichen (Pop und Klassik)
|
||||
|
|
@ -69,6 +72,7 @@ Empfohlenes Modell: `qwen3:8b` (5 GB). OCR: `qwen3-vl:latest`.
|
|||
| `OPENROUTER_API_KEY` | OpenRouter-Fallback (DeepSeek V3) | – |
|
||||
| `ACOUSTID_API_KEY` | AcoustID-Fingerprinting | – |
|
||||
| `DISCOGS_TOKEN` | Discogs-API | – |
|
||||
| `LASTFM_API_KEY` | Last.fm Cover + Tracklist-Fallback | – |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -93,6 +97,9 @@ music_enricher.py --album PFAD [Optionen]
|
|||
| `--no-cover` | Kein Cover-Art-Download |
|
||||
| `--album PFAD` | Einzelnes Album verarbeiten |
|
||||
| `--no-tqdm` | Fortschrittsanzeige deaktivieren |
|
||||
| `--status` | Bibliotheksstatus anzeigen (fehlende Cover, schlechte Tags) |
|
||||
| `--skip-complete` | Alben mit Cover + guten Tags überspringen (Batch-Optimierung) |
|
||||
| `--except PATTERN` | Album ausschließen (Glob oder Substring, mehrfach verwendbar) |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -118,6 +125,15 @@ python3 music_enricher.py --auto --confidence 0.90 \
|
|||
--embed-cover --rename --backup /tmp/backup \
|
||||
~/Musik
|
||||
|
||||
# Batch-Lauf: vollständige Alben überspringen, bestimmte ausschließen
|
||||
python3 music_enricher.py --auto --confidence 0.5 --rename --embed-cover \
|
||||
--no-fingerprint --skip-complete \
|
||||
--except 'Abba*' --except Eigene_Aufnahmen \
|
||||
~/Musik
|
||||
|
||||
# Bibliotheksstatus anzeigen (kein Schreiben)
|
||||
python3 music_enricher.py --status ~/Musik
|
||||
|
||||
# Album mit YouTube-IDs in Dateinamen (yt-dlp holt Titel + Kapitel automatisch)
|
||||
python3 music_enricher.py --auto --confidence 0.1 --rename --embed-cover \
|
||||
--album ~/Musik/Die_Bergvagabunden_Am_Lagefeuer.audio
|
||||
|
|
@ -146,11 +162,12 @@ Album-Verzeichnis
|
|||
3. MetadataResolver
|
||||
├─ AcoustID → MusicBrainz via Fingerprint
|
||||
├─ Textsuche → MusicBrainz-API
|
||||
├─ Discogs → Fallback
|
||||
├─ Discogs → Cover + vollständige Trackliste
|
||||
├─ Last.fm → Trackliste-Fallback
|
||||
└─ LLM-Reasoning → Ollama lokal → OpenRouter (DeepSeek V3)
|
||||
│
|
||||
▼
|
||||
4. CoverHandler — lokal (JPG/PNG/WebP) → MusicBrainz → einbetten
|
||||
4. CoverHandler — lokal → MusicBrainz CAA (front+back) → Discogs → iTunes → Last.fm → einbetten
|
||||
│
|
||||
▼
|
||||
5. ReviewStep — interaktiv oder --auto mit Konfidenz-Schwellwert
|
||||
|
|
@ -205,7 +222,7 @@ Music_Metadata_Enricher/
|
|||
├── metadata_resolver.py MusicBrainz + Discogs + Ollama/OpenRouter LLM
|
||||
├── cover_handler.py Cover-Art: Suche, WebP-Konvertierung, Download, Einbettung
|
||||
├── executor.py Backup, Tag-Schreiben, Umbenennen, M3U, CSV-Report
|
||||
└── test_suite_enricher.py 17 Unit-/Integrationstests
|
||||
└── test_suite_enricher.py 33 Unit-/Integrationstests
|
||||
```
|
||||
|
||||
---
|
||||
|
|
@ -214,7 +231,7 @@ Music_Metadata_Enricher/
|
|||
|
||||
```bash
|
||||
python3 test_suite_enricher.py
|
||||
# 📊 17/17 Tests erfolgreich
|
||||
# 📊 33/33 Tests erfolgreich
|
||||
```
|
||||
|
||||
---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue