From 97910623c8d315e47f3f775e7cdc3aded43ab32e Mon Sep 17 00:00:00 2001 From: dschlueter Date: Wed, 18 Feb 2026 11:17:55 +0100 Subject: [PATCH] Reduce log noise and fix spurious cover-not-found warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- src/musiksammlung/cli.py | 2 ++ src/musiksammlung/cover.py | 2 +- src/musiksammlung/organizer.py | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/musiksammlung/cli.py b/src/musiksammlung/cli.py index 1c2b98c..a53abe4 100644 --- a/src/musiksammlung/cli.py +++ b/src/musiksammlung/cli.py @@ -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 angeben.", err=True) generate_playlist(album, album_dir) if in_place: diff --git a/src/musiksammlung/cover.py b/src/musiksammlung/cover.py index 9c47ee3..dd10688 100644 --- a/src/musiksammlung/cover.py +++ b/src/musiksammlung/cover.py @@ -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") diff --git a/src/musiksammlung/organizer.py b/src/musiksammlung/organizer.py index 2aa2fe6..f220498 100644 --- a/src/musiksammlung/organizer.py +++ b/src/musiksammlung/organizer.py @@ -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)