fix: show clean error message when MusicBrainz barcode lookup fails

Catch ValueError (barcode not found) and httpx.HTTPError (network error)
in _scan_to_album and print a user-friendly message with hint instead of
a raw Python traceback. Also remove unused `call` import in test_ripper.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-02-18 06:18:12 +01:00
commit c0e4d2aa85
2 changed files with 14 additions and 2 deletions

View file

@ -1,7 +1,7 @@
"""Tests für den CD-Ripper."""
from pathlib import Path
from unittest.mock import MagicMock, call, patch
from unittest.mock import MagicMock, patch
from musiksammlung.config import AudioFormat
from musiksammlung.models import Album, Disc, Track