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:
parent
c27c1f9510
commit
97910623c8
3 changed files with 6 additions and 2 deletions
|
|
@ -305,6 +305,8 @@ def apply(
|
||||||
if cover:
|
if cover:
|
||||||
typer.echo(f"Bette Cover ein ({cover.name})...")
|
typer.echo(f"Bette Cover ein ({cover.name})...")
|
||||||
embed_album_cover(album, album_dir, cover)
|
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)
|
generate_playlist(album, album_dir)
|
||||||
|
|
||||||
if in_place:
|
if in_place:
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ def copy_covers(
|
||||||
prepare_cover(front_image, album_dir / "frontcover.jpg")
|
prepare_cover(front_image, album_dir / "frontcover.jpg")
|
||||||
else:
|
else:
|
||||||
if not find_cover(album_dir, "front"):
|
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():
|
if back_image and back_image.exists():
|
||||||
prepare_cover(back_image, album_dir / "backcover.jpg")
|
prepare_cover(back_image, album_dir / "backcover.jpg")
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,8 @@ def apply_mapping(mapping: dict[Path, Path], dry_run: bool = False) -> None:
|
||||||
logger.info("[DRY-RUN] %s → %s", source, target)
|
logger.info("[DRY-RUN] %s → %s", source, target)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if source == target:
|
||||||
|
continue
|
||||||
target.parent.mkdir(parents=True, exist_ok=True)
|
target.parent.mkdir(parents=True, exist_ok=True)
|
||||||
shutil.move(str(source), str(target))
|
shutil.move(str(source), str(target))
|
||||||
logger.info("Verschoben: %s → %s", source, target)
|
logger.info("Verschoben: %s → %s", source.name, target.name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue