Reduce log noise and fix spurious cover-not-found warning

- organizer: skip move when src == dst (in-place re-apply produces no
  log spam); log only filename instead of full path
- cover: demote 'Kein Front-Cover gefunden' from WARNING to DEBUG —
  copy_covers is not the final authority on cover availability
- cli apply: emit user-visible hint only when cover is truly absent
  after all fallbacks (including parent-dir search for CD subdirs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-02-18 11:17:55 +01:00
commit 97910623c8
3 changed files with 6 additions and 2 deletions

View file

@ -305,6 +305,8 @@ def apply(
if cover:
typer.echo(f"Bette Cover ein ({cover.name})...")
embed_album_cover(album, album_dir, cover)
elif not front:
typer.echo("Hinweis: Kein Cover gefunden — mit --front <bild> angeben.", err=True)
generate_playlist(album, album_dir)
if in_place:

View file

@ -73,7 +73,7 @@ def copy_covers(
prepare_cover(front_image, album_dir / "frontcover.jpg")
else:
if not find_cover(album_dir, "front"):
logger.warning("Kein Front-Cover gefunden")
logger.debug("Kein Front-Cover in %s", album_dir)
if back_image and back_image.exists():
prepare_cover(back_image, album_dir / "backcover.jpg")

View file

@ -150,6 +150,8 @@ def apply_mapping(mapping: dict[Path, Path], dry_run: bool = False) -> None:
logger.info("[DRY-RUN] %s%s", source, target)
continue
if source == target:
continue
target.parent.mkdir(parents=True, exist_ok=True)
shutil.move(str(source), str(target))
logger.info("Verschoben: %s%s", source, target)
logger.info("Verschoben: %s%s", source.name, target.name)