mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-02-04 11:07:48 -08:00
refactor(cli-utils-image): rename render_image to render
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
from typing import Callable, Dict, Literal, Optional
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
from .....libs.media_api.params import (
|
||||
MediaAiringScheduleParams,
|
||||
MediaCharactersParams,
|
||||
@@ -256,6 +254,7 @@ def _view_info(ctx: Context, state: State) -> MenuAction:
|
||||
|
||||
from rich import box
|
||||
from rich.columns import Columns
|
||||
from rich.console import Console
|
||||
from rich.panel import Panel
|
||||
from rich.table import Table
|
||||
from rich.text import Text
|
||||
@@ -267,7 +266,7 @@ def _view_info(ctx: Context, state: State) -> MenuAction:
|
||||
|
||||
# Display cover image if available
|
||||
if cover_image := media_item.cover_image:
|
||||
image.render_image(cover_image.large)
|
||||
image.render(cover_image.large)
|
||||
|
||||
# Create main title
|
||||
main_title = (
|
||||
|
||||
@@ -13,7 +13,7 @@ import httpx
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def render_image(url: str, capture: bool = False, size: str = "30x30") -> Optional[str]:
|
||||
def render(url: str, capture: bool = False, size: str = "30x30") -> Optional[str]:
|
||||
"""
|
||||
Renders an image from a URL in the terminal using icat or chafa.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user