mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-06 17:53:40 -08:00
chore: format with ruff
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user