chore: format with ruff

This commit is contained in:
Benexl
2025-07-27 12:49:44 +03:00
parent abe36296c1
commit 5b06039cef
16 changed files with 96 additions and 83 deletions

View File

@@ -40,16 +40,18 @@ def stats(config: "AppConfig"):
"Authentication Required",
f"You must be logged in to {config.general.media_api} to sync your media list.",
)
feedback.info("Run this command to authenticate:", f"fastanime {config.general.media_api} auth")
feedback.info(
"Run this command to authenticate:",
f"fastanime {config.general.media_api} auth",
)
raise click.Abort()
# Check if kitten is available for image display
KITTEN_EXECUTABLE = shutil.which("kitten")
if not KITTEN_EXECUTABLE:
feedback.warning("Kitten not found - profile image will not be displayed")
feedback.warning(
"Kitten not found - profile image will not be displayed"
)
else:
# Display profile image using kitten icat
if profile.avatar_url:
@@ -92,4 +94,4 @@ def stats(config: "AppConfig"):
raise click.Abort()
except Exception as e:
feedback.error("Unexpected error occurred", str(e))
raise click.Abort()
raise click.Abort()

View File

@@ -176,16 +176,12 @@ def stream_anime(
f"Failed to get stream link for anime: {anime.title}, episode: {episode}"
)
print(f"[green bold]Now Streaming:[/] {anime.title} Episode: {episode}")
# Check if IPC player should be used
if config.mpv.use_ipc:
# Get available episodes for current translation type
available_episodes = getattr(
anime.episodes,
config.stream.translation_type,
[]
)
available_episodes = getattr(anime.episodes, config.stream.translation_type, [])
# Use IPC player with episode navigation capabilities
player.play(
PlayerParams(
@@ -200,7 +196,7 @@ def stream_anime(
current_episode=episode,
current_anime_id=anime.id,
current_anime_title=anime.title,
current_translation_type=config.stream.translation_type
current_translation_type=config.stream.translation_type,
)
)
else: