From 63c697f082d2b4d519be6fe31c29807dc55bf916 Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 4 Aug 2025 05:55:32 +0000 Subject: [PATCH] feat(series): Enhance tree representation with season breakdown --- unshackle/core/titles/episode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unshackle/core/titles/episode.py b/unshackle/core/titles/episode.py index 71bf79a..119409f 100644 --- a/unshackle/core/titles/episode.py +++ b/unshackle/core/titles/episode.py @@ -201,9 +201,10 @@ class Series(SortedKeyList, ABC): def tree(self, verbose: bool = False) -> Tree: seasons = Counter(x.season for x in self) num_seasons = len(seasons) - num_episodes = sum(seasons.values()) + sum(seasons.values()) + season_breakdown = ", ".join(f"S{season}({count})" for season, count in sorted(seasons.items())) tree = Tree( - f"{num_seasons} Season{['s', ''][num_seasons == 1]}, {num_episodes} Episode{['s', ''][num_episodes == 1]}", + f"{num_seasons} seasons, {season_breakdown}", guide_style="bright_black", ) if verbose: