Add phone-based EAN scanning, scanner server for cover upload, Vision-LLM integration

New features:
- EAN/Barcode can now be entered by typing or by photographing the CD sleeve;
  Vision-LLM (extract_barcode_from_image) reads the barcode from the photo
- Scanner server (port 8765) starts at the beginning of every album loop,
  serving both EAN barcode scanning and back cover upload via QR code
- Vision-LLM analyses back cover in background thread while ripping;
  priority: Vision-LLM > MusicBrainz > CDDB
- _find_abcde_mbid reads MBID from abcde temp dirs for CAA cover download
  even when the CD barcode is not linked in MusicBrainz
- Concrete copy-paste apply commands shown after each album in 'Next steps'
- _sanitize_name: whitelist approach (removes brackets and punctuation)
- qrcode added as dependency for terminal QR code display

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-02-19 14:05:59 +01:00
commit 32c84b9edb
15 changed files with 1027 additions and 92 deletions

View file

@ -9,10 +9,12 @@ CLI-Tool zum Digitalisieren von CD-Sammlungen für Jellyfin.
**Musiksammlung** automatisiert die Digitalisierung physischer CDs:
1. CDs rippen (via `abcde`, CDDB-Lookup)
2. Coverbilder per OCR oder Vision-LLM analysieren
3. Tracklisten per LLM extrahieren und als JSON speichern
4. Audiodateien umbenennen, taggen und in Jellyfin-Struktur ablegen
5. M3U-Playlisten erzeugen
2. Backcover automatisch via Smartphone-Upload erfassen
3. Backcover per Vision-LLM parallel zum Ripping analysieren (Cloud-Modell, kein lokales VRAM nötig)
4. Coverbilder per OCR oder Vision-LLM analysieren
5. Tracklisten per LLM extrahieren und als JSON speichern
6. Audiodateien umbenennen, taggen und in Jellyfin-Struktur ablegen
7. M3U-Playlisten erzeugen
## Voraussetzungen
@ -20,6 +22,7 @@ CLI-Tool zum Digitalisieren von CD-Sammlungen für Jellyfin.
- `abcde` (CD-Ripping)
- `tesseract` (OCR, optional)
- Ollama oder OpenAI-kompatibles LLM (optional)
- Firewall: Port 8765 (TCP) für Smartphone-Upload offen (`sudo ufw allow 8765/tcp`)
## Installation
@ -31,6 +34,7 @@ pip install -e ".[dev]"
```bash
# CDs rippen (interaktiv, EAN-First: MusicBrainz → Auto-Rip bei Treffer)
# QR-Code im Terminal: Backcover mit Smartphone fotografieren → Vision-LLM analysiert parallel
musiksammlung rip -j 0 -P
# Variante A: EAN/Barcode → MusicBrainz → album.json (schnellste Methode)