diff options
| author | Fuwn <[email protected]> | 2025-07-07 03:11:34 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-07-07 03:11:34 -0700 |
| commit | 3893cb57df29ed08d05d5444aa2453c79c48f31f (patch) | |
| tree | a94d4c66dc66d5b060c89d6ce491aebd0e48a6b3 | |
| parent | feat(schedule): Support pagination (diff) | |
| download | oguri-3893cb57df29ed08d05d5444aa2453c79c48f31f.tar.xz oguri-3893cb57df29ed08d05d5444aa2453c79c48f31f.zip | |
feat(schedule): Display genres in table
| -rw-r--r-- | src/oguri/schedule.py | 4 |
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) |