aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-07-07 03:11:34 -0700
committerFuwn <[email protected]>2025-07-07 03:11:34 -0700
commit3893cb57df29ed08d05d5444aa2453c79c48f31f (patch)
treea94d4c66dc66d5b060c89d6ce491aebd0e48a6b3
parentfeat(schedule): Support pagination (diff)
downloadoguri-3893cb57df29ed08d05d5444aa2453c79c48f31f.tar.xz
oguri-3893cb57df29ed08d05d5444aa2453c79c48f31f.zip
feat(schedule): Display genres in table
-rw-r--r--src/oguri/schedule.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/oguri/schedule.py b/src/oguri/schedule.py
index c56db98..5b39bf8 100644
--- a/src/oguri/schedule.py
+++ b/src/oguri/schedule.py
@@ -122,6 +122,7 @@ async def show_schedule(
table.add_column("Title")
table.add_column("Episode")
table.add_column("Airing Time")
+ table.add_column("Genres")
for schedule in airing_schedules:
airing_at = schedule.get("airingAt")
@@ -131,6 +132,8 @@ async def show_schedule(
titles = media.get("title")
title = (
titles.get("english") or titles.get("romaji") or titles.get("native"))
+ media_genres = media.get("genres", [])
+ genres_string = ", ".join(media_genres)
if airing_at:
airing_at_date = datetime.fromtimestamp(airing_at)
@@ -147,6 +150,7 @@ async def show_schedule(
f"[link={site_url}]{title}[/link]",
str(episode),
airing_time_string,
+ genres_string,
)
console.print(table)