diff --git a/src/rupert/main.py b/src/rupert/main.py index b4931a7..08dc533 100644 --- a/src/rupert/main.py +++ b/src/rupert/main.py @@ -1,6 +1,7 @@ import logging import os from pathlib import Path +import sys from typing import Any, Dict, Iterable, List, Optional import typer @@ -94,7 +95,7 @@ def prompt_menu(console: Console, choices: Iterable[Any]) -> int: console.print(f'[bright_yellow]{idx + 1})[/bright_yellow]: {choice}') max_ += 1 while 1: - choice = Prompt.ask('Selection') + choice = Prompt.ask('Selection', console=console) try: i = int(choice) except ValueError: @@ -155,7 +156,7 @@ def run( help='Increase log level (can be repated)', ), ): - console = Console(highlight=False) + console = Console(highlight=False, stderr=True) if verbose < 1: level = logging.WARNING elif verbose < 2: @@ -179,6 +180,8 @@ def run( release = get_release_by_id(mbid) else: release = prompt_release(console, dev) + if not sys.stdout.isatty(): + print(f'{release.artist_credit_phrase} - {release.title}') console.print(f'Ripping {format_release(release)}') num_discs = len(release.medium_list)